本文整理匯總了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);
}