public void AddChangePoolEntry(ChangePoolEntry changePoolEntry) { lock (this) { this.ChangePool.Add(changePoolEntry); } }
private void ReloadFileOpenInIse(ChangePoolEntry changeEntry) { string path = changeEntry.PathChanged; var iseFile = this.IseIntegrator.OpenIseFiles.FirstOrDefault(f => f.FullPath == path); if (iseFile == null) { return; } var fileExists = File.Exists(path); if (this.IseIntegrator.IsFileSaved(path)) { if (fileExists) { if (this.CompareFileContents(path, iseFile.Editor.Text)) { return; } this.IseIntegrator.GoToFile(path); } string question; if (fileExists) { question = String.Format("File '{0}' has been modified by another program.\n\nDo you want to reload it?", path); } else if (changeEntry.PathAfterRename != null) { question = String.Format("File '{0}' has been moved to '{1}'.\n\nDo you want to reload it?", path, changeEntry.PathAfterRename); } else { question = String.Format("File '{0}' has been deleted.\n\nDo you want to close it?", path); } if (MessageBoxHelper.ShowQuestion("Reload file", question)) { this.IseIntegrator.CloseFile(path); if (changeEntry.PathAfterRename != null) { this.IseIntegrator.GoToFile(changeEntry.PathAfterRename); } else if (fileExists) { this.IseIntegrator.GoToFile(path); } } } else { string message; if (fileExists) { this.IseIntegrator.GoToFile(path); message = String.Format("File '{0}' has been modified by another program.\n\nSince the file had been changed in ISE editor, you will need to reload it manually.", path); } else if (changeEntry.PathAfterRename != null) { message = String.Format("File '{0}' has been moved to '{1}.\n\nSince the file had been changed in ISE editor, you will need to reload it manually.", path, changeEntry.PathAfterRename); } else { message = String.Format("File '{0}' has been deleted. Since the file had been changed in ISE editor, you will need to reload it manually.", path); } MessageBoxHelper.ShowInfo(message); } }