本文整理汇总了C#中MonoDevelop.Projects.ProjectFileRenamedEventArgs类的典型用法代码示例。如果您正苦于以下问题:C# ProjectFileRenamedEventArgs类的具体用法?C# ProjectFileRenamedEventArgs怎么用?C# ProjectFileRenamedEventArgs使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ProjectFileRenamedEventArgs类属于MonoDevelop.Projects命名空间,在下文中一共展示了ProjectFileRenamedEventArgs类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: IdeApp_Workspace_FileRenamedInProject
void IdeApp_Workspace_FileRenamedInProject (object sender, ProjectFileRenamedEventArgs e)
{
foreach (var file in e) {
if (file.OldName.FileName == file.NewName.FileName) {
//a directory filename changed
var oldDir = file.OldName.ParentDirectory;
var newDir = file.NewName.ParentDirectory;
if (!newDir.ToString ().Contains ("Resources")) {
return;
}
while (oldDir.FileName == newDir.FileName) {
oldDir = oldDir.ParentDirectory;
newDir = newDir.ParentDirectory;
}
ClearOwnFileErrors (oldDir);
CheckDirectoryName (newDir);
} else {
ClearOwnFileErrors (file.OldName);
CheckProjectFileName (file.ProjectFile);
}
}
}
示例2: OnFileRenamedInProject
protected override void OnFileRenamedInProject(ProjectFileRenamedEventArgs e)
{
UpdateParseCache ();
base.OnFileRenamedInProject (e);
}
示例3: HandleRename
static void HandleRename (ProjectFileRenamedEventArgs e)
{
foreach (ProjectFileEventInfo args in e) {
var file = args.ProjectFile;
var tool = GetGenerator (file.Generator);
if (tool == null)
continue;
}
}
示例4: OnFileRenamed
void OnFileRenamed (object sender, ProjectFileRenamedEventArgs args)
{
foreach (ProjectFileRenamedEventInfo fargs in args) {
RemoveFile (fargs.OldName);
FileEntry file = AddFile (fargs.NewName);
// CheckModifiedFiles won't detect new files, so parsing
// must be manyally signaled
QueueParseJob (file);
}
}
示例5: OnFileRenamedInProject
protected override void OnFileRenamedInProject (ProjectFileRenamedEventArgs e)
{
base.OnFileRenamedInProject (e);
if (Loading)
return;
if (e.ProjectFile.BuildAction == MonoDroidBuildAction.AndroidResource)
QueueResgenUpdate ();
//if renaming the file to "AndroidManifest.xml", and the manifest element is not in use, set it as a convenience
else if (AndroidManifest.IsNullOrEmpty && e.NewName.ToRelative (BaseDirectory) == "AndroidManifest.xml")
AndroidManifest = e.NewName;
//track manifest file renames or things will break
else if (AndroidManifest == e.OldName)
AndroidManifest = e.NewName;
}
示例6: FileRenamed
static void FileRenamed (object sender, ProjectFileRenamedEventArgs e)
{
bool changed = false;
foreach (ProjectFileRenamedEventInfo args in e) {
foreach (NavigationHistoryItem point in history) {
DocumentNavigationPoint dp = point.NavigationPoint as DocumentNavigationPoint;
changed &= (dp != null && dp.HandleRenameEvent (args.OldName, args.NewName));
}
}
if (changed)
OnHistoryChanged ();
}
示例7: HandleFileRenamed
private void HandleFileRenamed(ProjectFileRenamedEventArgs args)
{
foreach (var info in args) {
RemoveFile(new ProjectFile(info.OldName));
AddFile(new ProjectFile(info.NewName), info.Project);
}
}
示例8: OnFileRenamedInProject
/// <summary>
/// Raises the FileRenamedInProject event.
/// </summary>
protected virtual void OnFileRenamedInProject (ProjectFileRenamedEventArgs e)
{
if (FileRenamedInProject != null) {
FileRenamedInProject (this, e);
}
}
示例9: OnFileRenamedInProject
void OnFileRenamedInProject (object s, ProjectFileRenamedEventArgs args)
{
if (loading) return;
foreach (ProjectFileRenamedEventInfo e in args) {
if (e.ProjectFile.BuildAction != BuildAction.Compile)
continue;
if (RemoveSourceFile (e.OldName))
AddSourceFile (e.NewName);
}
}
示例10: ExecuteFileRenamedAction
private void ExecuteFileRenamedAction(ProjectFileRenamedEventArgs args)
{
if (sourceProject == null) {
return;
}
HandleFileRenamed(args);
SaveTargetProjects();
}
示例11: OnFileRenamedInProject
void OnFileRenamedInProject (object s, ProjectFileRenamedEventArgs e)
{
if (loading) return;
if (e.ProjectFile.BuildAction != BuildAction.Compile)
return;
if (RemoveSourceFile (e.OldName))
AddSourceFile (e.NewName);
}
示例12: OnFileRenamedInProject
protected override void OnFileRenamedInProject(ProjectFileRenamedEventArgs e)
{
base.OnFileRenamedInProject (e);
foreach (ProjectFileRenamedEventInfo item in e)
if (item.ProjectFile.Subtype == Subtype.Code && item.ProjectFile.BuildAction == BuildAction.Compile)
typescript.ShimHost.UpdateScript (typescript.GetFilePath (item.OldName), null);
// FIXME: make sure that adding, removing and then adding the same file still works (as "remove" does not really remove it).
foreach (ProjectFileRenamedEventInfo item in e)
if (item.ProjectFile.Subtype == Subtype.Code && item.ProjectFile.BuildAction == BuildAction.Compile)
typescript.ShimHost.AddScript (typescript.GetFilePath (item.NewName), File.ReadAllText (typescript.GetFilePath (item.NewName)));
}
示例13: OnFileRenamedInProject
protected override void OnFileRenamedInProject(ProjectFileRenamedEventArgs e)
{
//e.
//if (e.OldName == MainSource)
// MainSource = e.NewName;
//base.OnFileRenamedInProject(e);
}
示例14: OnRenameFile
void OnRenameFile (object sender, ProjectFileRenamedEventArgs args)
{
foreach (ProjectFileEventInfo e in args) {
ITreeBuilder tb = Context.GetTreeBuilder (e.ProjectFile);
if (tb != null) tb.Update ();
}
}
示例15: OnFileRenamedInProject
internal protected virtual void OnFileRenamedInProject (ProjectFileRenamedEventArgs e)
{
next.OnFileRenamedInProject (e);
}