protected override Project OnCreateProject(ProjectCreateInformation info) { GameProjectFile gameProjectFile = new GameProjectFile(info); gameProjectFile.Content = this.CreateProjectContent(info); return(new Project(info.FileName, gameProjectFile)); }
protected virtual bool CanReceiveResourceObject(ResourceInfoDragData objectData) { bool result; if (objectData == null) { result = false; } else { GameProjectFile gameProjectFile = Services.ProjectOperations.CurrentSelectedProject.ProjectItem as GameProjectFile; if (gameProjectFile == null) { result = false; } else { foreach (ResourceItem current in objectData.Items) { if (!(current is ImageFile) && !(current is PlistImageFile) && !(current is Project)) { result = false; return(result); } } result = true; } } return(result); }
private string CheckNest(ResourceFile value) { Project project = value as Project; if (project == null) { return((string)null); } Project currentSelectedProject = Services.ProjectOperations.CurrentSelectedProject; if (currentSelectedProject == null) { return((string)null); } GameProjectFile projectItem = currentSelectedProject.ProjectItem as GameProjectFile; if (projectItem == null) { return("No Project"); } if ((MonoDevelop.Core.FilePath)project.FullPath == projectItem.FileName) { return(LanguageInfo.MessageBox207_NestedSelfError); } return(project.CheckNest(currentSelectedProject)); }
private string CanDragDrop(DragDropArgs e) { ResourceInfoDragData resourceInfoDragData = e.Context.GetDragData() as ResourceInfoDragData; GameProjectFile gameProjectFile = Services.ProjectOperations.CurrentSelectedProject.ProjectItem as GameProjectFile; string result; foreach (ResourceItem current in resourceInfoDragData.Items) { if (current.FullPath == gameProjectFile.FileName) { result = LanguageInfo.MessageBox207_NestedSelfError; return(result); } Project project = current as Project; if (project != null) { string text = project.CheckNest(gameProjectFile.Project); if (!string.IsNullOrEmpty(text)) { result = text; return(result); } } } result = null; return(result); }
private string CheckNest(ResourceFile value) { Project project = value as Project; string result; if (project == null) { result = null; } else { Project currentSelectedProject = Services.ProjectOperations.CurrentSelectedProject; if (currentSelectedProject == null) { result = null; } else { GameProjectFile gameProjectFile = currentSelectedProject.ProjectItem as GameProjectFile; if (gameProjectFile == null) { result = "No Project"; } else if (project.FullPath == gameProjectFile.FileName) { result = LanguageInfo.MessageBox207_NestedSelfError; } else { result = project.CheckNest(currentSelectedProject); } } } return(result); }
public static string GetProjectType(this Project project) { GameProjectFile projectFile = project.GetProjectFile(); if (projectFile != null) { return(projectFile.ProjectType); } return(string.Empty); }
public static GameProjectContent GetProjectContent(this Project project) { GameProjectFile projectFile = project.GetProjectFile(); if (projectFile != null) { return(projectFile.Content as GameProjectContent); } return((GameProjectContent)null); }
public static string GetProjectType(this Project project) { GameProjectFile projectFile = project.GetProjectFile(); string result; if (projectFile != null) { result = projectFile.ProjectType; } else { result = string.Empty; } return(result); }
public static GameProjectContent GetProjectContent(this Project project) { GameProjectFile projectFile = project.GetProjectFile(); GameProjectContent result; if (projectFile != null) { result = (projectFile.Content as GameProjectContent); } else { result = null; } return(result); }
private string CanDragDrop(DragDropArgs e) { ResourceInfoDragData dragData = e.Context.GetDragData() as ResourceInfoDragData; GameProjectFile projectItem = Services.ProjectOperations.CurrentSelectedProject.ProjectItem as GameProjectFile; foreach (ResourceItem resourceItem in (IEnumerable <ResourceItem>)dragData.Items) { if ((FilePath)resourceItem.FullPath == projectItem.FileName) { return(LanguageInfo.MessageBox207_NestedSelfError); } Project project = resourceItem as Project; if (project != null) { string str = project.CheckNest(projectItem.Project); if (!string.IsNullOrEmpty(str)) { return(str); } } } return((string)null); }