/// <summary> /// Internal function to raise a project event /// </summary> /// <param name="type"></param> public void RaiseProject(ProjectEntity entity, ProjectEventType type) { Trace.TraceInformation("Project event :{0} is {1}.", entity != null ? entity.ProjectFilePath : string.Empty, type.ToString()); if (CheckAccess()) { ProjectEventArgs args = new ProjectEventArgs(type, entity != null ? entity.ProjectFilePath : string.Empty); if (OnProjectChange != null) { OnProjectChange(this, args); } } else { Dispatcher.Invoke(DispatcherPriority.Normal, (ThreadStart) delegate { ProjectEventArgs args = new ProjectEventArgs(type, entity != null ? entity.ProjectFilePath : string.Empty); if (OnProjectChange != null) { OnProjectChange(this, args); } }); } }
public ProjectEventArgs(ProjectEventType type, string fileName) : base(MessageEventType.Info) { switch (type) { case ProjectEventType.Opened: Info.Details = string.Format(Resources.CORE_PROJECT_LOADED, fileName); break; case ProjectEventType.Saved: case ProjectEventType.Closed: Info.Details = string.Format(Resources.CORE_PROJECT_SAVED, fileName); break; } ProjectType = type; FileName = fileName; }
/// <summary> /// /// </summary> /// <param name="ANewProject"></param> public ProjectEventArgs(Project NewProject, ProjectTask NewTask, ProjectEventType NewType) { _Project = NewProject; _Task = NewTask; _Type = NewType; }
public ProjectEventArgs(ProjectEventType type) : base(MessageEventType.Info) { ProjectType = type; FileName = string.Empty; }