本文整理汇总了C#中MonoDevelop.Projects.ProjectFileEventArgs类的典型用法代码示例。如果您正苦于以下问题:C# ProjectFileEventArgs类的具体用法?C# ProjectFileEventArgs怎么用?C# ProjectFileEventArgs使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ProjectFileEventArgs类属于MonoDevelop.Projects命名空间,在下文中一共展示了ProjectFileEventArgs类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: HandleProjectFileChangedInProject
void HandleProjectFileChangedInProject (object sender, ProjectFileEventArgs args)
{
foreach (ProjectFileEventInfo e in args) {
if (IsXibFile (e.ProjectFile))
ThreadPool.QueueUserWorkItem (delegate { UpdateXibCodebehind (e.ProjectFile); });
}
}
示例2: Log
internal static void Log(String messageFormat, ProjectFileEventArgs e)
{
foreach (ProjectFileEventInfo info in e) {
ProjectFile projectFile = info.ProjectFile;
Log (messageFormat, projectFile.Name);
}
}
示例3: HandleSolutionFileChangedInProject
void HandleSolutionFileChangedInProject (object sender, ProjectFileEventArgs e)
{
if (e.Project is DotNetProject) {
projectTimestamps [(DotNetProject)e.Project] = DateTime.Now;
OnChanged ();
}
}
示例4: OnFilePropertyChangedInProject
void OnFilePropertyChangedInProject (object sender, ProjectFileEventArgs args)
{
var pad = IdeApp.Workbench.GetPad <PropertyPad> ();
if (pad == null)
return;
var grid = ((PropertyPad)pad.Content).PropertyGrid;
if (args.Any (arg => arg.ProjectFile == file))
grid.Refresh ();
}
示例5: OnFilePropertyChangedInProject
void OnFilePropertyChangedInProject (object sender, ProjectFileEventArgs args)
{
var pad = IdeApp.Workbench.GetPad <PropertyPad> ();
if (pad == null)
return;
var grid = ((PropertyPad)pad.Content).PropertyGrid;
if (grid.IsEditing)
return;
if (args.Any (arg => arg.ProjectFile == file))
grid.Populate (saveEditSession: false);
}
示例6: OnFileAdded
void OnFileAdded (object o, ProjectFileEventArgs a)
{
if (a.ProjectFile.Name.EndsWith (".desktop")) {
DesktopEntry de = new DesktopEntry ();
try {
de.Load (a.ProjectFile.Name);
a.ProjectFile.BuildAction = BuildAction.Content;
DeployProperties props = DeployService.GetDeployProperties (a.ProjectFile);
props.TargetDirectory = LinuxTargetDirectory.DesktopApplications;
if (string.IsNullOrEmpty (de.Exec)) {
LinuxDeployData dd = LinuxDeployData.GetLinuxDeployData (a.Project);
if (dd.GenerateScript && !string.IsNullOrEmpty (dd.ScriptName)) {
de.Exec = dd.ScriptName;
de.Save (a.ProjectFile.Name);
}
}
} catch (Exception ex) {
LoggingService.LogError ("Could not read .desktop file", ex);
}
}
}
示例7: OnFilePropertyChangedInProject
protected override void OnFilePropertyChangedInProject(ProjectFileEventArgs e)
{
NeedsFullRebuild = true;
base.OnFilePropertyChangedInProject (e);
}
示例8: CheckFileChanges
void CheckFileChanges (ProjectFileEventArgs e)
{
bool updateTypes = false, updateProject = false;
foreach (ProjectFileEventInfo finf in e) {
if (finf.Project != dnp)
continue;
if (finf.ProjectFile.BuildAction == BuildAction.Compile) {
updateTypes = true;
} else if (IncludeInSyncedProject (finf.ProjectFile)) {
updateProject = true;
}
}
if (updateTypes) {
using (var monitor = GetStatusMonitor (GettextCatalog.GetString ("Syncing types to Xcode..."))) {
//FIXME: make this async (and safely async)
//FIXME: only update the project if obj-c types change
updateProject |= UpdateTypes (monitor);
}
}
if (updateProject) {
using (var monitor = GetStatusMonitor (GettextCatalog.GetString ("Syncing project to Xcode..."))) {
//FIXME: make this async (and safely async)
var running = xcode.CheckRunning ();
UpdateXcodeProject (monitor);
if (running) {
try {
xcode.OpenProject (monitor);
} catch (AppleScriptException) {
ShowXcodeScriptError ();
} catch (TimeoutException) {
ShowXcodeScriptError ();
}
}
}
}
}
示例9: OnFileAddedToProject
protected override void OnFileAddedToProject (ProjectFileEventArgs e)
{
//short-circuit if the project is being deserialised
if (Project.Loading) {
base.OnFileAddedToProject (e);
return;
}
bool webConfigChange = false;
List<string> filesToAdd = new List<string> ();
foreach (ProjectFileEventInfo fargs in e) {
IEnumerable<string> files = MonoDevelop.DesignerSupport.CodeBehind.GuessDependencies
(Project, fargs.ProjectFile, groupedExtensions);
if (files != null)
filesToAdd.AddRange (files);
if (IsWebConfig (fargs.ProjectFile.FilePath))
webConfigChange = true;
}
if (webConfigChange)
UpdateWebConfigRefs ();
//let the base fire the event before we add files
//don't want to fire events out of order of files being added
base.OnFileAddedToProject (e);
//make sure that the parent and child files are in the project
foreach (string file in filesToAdd) {
//NOTE: this only adds files if they are not already in the project
Project.AddFile (file);
}
}
示例10: OnFileChangedInProject
protected override void OnFileChangedInProject (ProjectFileEventArgs e)
{
IDELogger.Log ("MonobjcProject::OnFileChangedInProject '{0}'", e);
this.ResolverHandler.ClearCache();
this.XcodeHandler.ClearXcodeProject();
base.OnFileChangedInProject (e);
this.CodeBehindHandler.GenerateDesignCodeForXib (e);
}
示例11: OnFileRemoved
void OnFileRemoved (object sender, ProjectFileEventArgs e)
{
ArrayList toDelete = new ArrayList ();
foreach (ProjectFileEventInfo args in e) {
var doc = TypeSystemService.ParseFile (args.Project, args.ProjectFile.Name);
if (doc == null)
continue;
foreach (var t in doc.TopLevelTypeDefinitions) {
GuiBuilderWindow win = GetWindowForClass (t.FullName);
if (win != null)
toDelete.Add (win);
}
}
foreach (GuiBuilderWindow win in toDelete)
Remove (win);
}
示例12: OnFileChangedInProject
/// <summary>
/// Raises the FileChangedInProject event.
/// </summary>
protected virtual void OnFileChangedInProject (ProjectFileEventArgs e)
{
if (FileChangedInProject != null) {
FileChangedInProject (this, e);
}
}
示例13: OnFileAddedToProject
/// <summary>
/// Raises the FileAddedToProject event.
/// </summary>
protected virtual void OnFileAddedToProject (ProjectFileEventArgs e)
{
buildActions = null;
if (FileAddedToProject != null) {
FileAddedToProject (this, e);
}
}
示例14: OnFileRemovedFromProject
/// <summary>
/// Raises the FileRemovedFromProject event.
/// </summary>
protected virtual void OnFileRemovedFromProject (ProjectFileEventArgs e)
{
buildActions = null;
if (FileRemovedFromProject != null) {
FileRemovedFromProject (this, e);
}
}
示例15: NotifyFileAddedToProject
void NotifyFileAddedToProject (IEnumerable<ProjectFile> objs)
{
if (!objs.Any ())
return;
var args = new ProjectFileEventArgs ();
foreach (ProjectFile file in objs) {
if (file.Project != null)
throw new InvalidOperationException ("ProjectFile already belongs to a project");
file.SetProject (this);
args.Add (new ProjectFileEventInfo (this, file));
ResolveDependencies (file);
}
SetDirty ();
NotifyModified ("Files");
OnFileAddedToProject (args);
}