private void projectChanged() { if (ProjectChanged != null) { ProjectChanged.Invoke(this); } }
/// <summary> /// Fires the <see cref="ProjectChanged" /> event. This occurs <b>after</b> the events <see cref="ProjectOpened" />, /// <see cref="ProjectClosed" />, <see cref="ProjectRenamed" />, and <see cref="ProjectDirtyChanged" /> event. Usefull if /// you not want to subscribe to the above mentioned single events. /// </summary> protected virtual void OnProjectChanged(ProjectEventArgs e) { switch (e.ProjectEventKind) { case ProjectEventKind.ProjectOpening: break; case ProjectEventKind.ProjectOpened: ProjectOpened?.Invoke(this, e); break; case ProjectEventKind.ProjectClosing: break; case ProjectEventKind.ProjectClosed: ProjectClosed?.Invoke(this, e); break; case ProjectEventKind.ProjectRenamed: ProjectRenamed?.Invoke(this, (ProjectRenamedEventArgs)e); break; case ProjectEventKind.ProjectDirtyChanged: ProjectDirtyChanged?.Invoke(this, e); break; default: break; } ProjectChanged?.Invoke(this, e); }
void HandleProjectRenamed(Project project, string oldname) { if (_disposed) { return; } ProjectChanged.Raise(this, EventArgs.Empty); }
public void closeProject() { closeResourceProvider(); timelineController.setResourceProvider(null); if (ProjectChanged != null) { ProjectChanged.Invoke(this); } }
private async void InitializeDataFromStorage() { var data = (await _storageService.GetAll()).ToList(); Project = data.Any() ? data.First() : null; ProjectChanged?.Invoke(Project); if (Project != null) { ProjectTitleChanged?.Invoke(Project.Title); } }
void HandleProjectAdded(Project project) { if (_disposed) { return; } lock (_projects) _projects.Add(new DteProject(project)); ProjectChanged.Raise(this, EventArgs.Empty); }
void HandleProjectRemoved(Project project) { if (_disposed) { return; } lock (_projects) _projects.RemoveAll(x => x.DteObject == project); ProjectChanged.Raise(this, EventArgs.Empty); }
public void ImportBizHawkCdl(string filename) { BizHawkCdlImporter.Import(filename, Project.Data.GetSnesApi() ?? throw new InvalidOperationException("Project has no SNES API Present")); ProjectChanged?.Invoke(this, new IProjectController.ProjectChangedEventArgs { ChangeType = IProjectController.ProjectChangedEventArgs.ProjectChangedType.Imported, Filename = filename, Project = Project, }); }
public void ImportBizHawkCdl(string filename) { BizHawkCdlImporter.Import(filename, Project.Data); ProjectChanged?.Invoke(this, new ProjectChangedEventArgs() { ChangeType = ProjectChangedEventArgs.ProjectChangedType.Imported, Filename = filename, Project = Project, }); }
private void OnProjectOpenSuccess(string filename, Project project) { ProjectView.Project = Project = project; Project.PropertyChanged += Project_PropertyChanged; ProjectChanged?.Invoke(this, new ProjectChangedEventArgs() { ChangeType = ProjectChangedEventArgs.ProjectChangedType.Opened, Filename = filename, Project = project, }); }
/// <summary> /// Adds the inputted test result to this project and saves the file. /// Will also fire the ProjectChanged event. /// </summary> /// <param name="testResult"></param> public void AddTestResult(TestResult testResult) { TestResults.Add(testResult); Save(); ProjectChangedEventArgs args = new ProjectChangedEventArgs(this, new List <TestResult>() { testResult }, new List <TestResult>()); // Make sure to invoke the ProjectChanged event on the UI thread as it will be used to update UI. Application.Current.Dispatcher.Invoke(() => ProjectChanged?.Invoke(args)); }
public void CloseProject() { if (Project == null) { return; } ProjectChanged?.Invoke(this, new ProjectChangedEventArgs() { ChangeType = ProjectChangedEventArgs.ProjectChangedType.Closing }); Project = null; }
public MLTProject(string pFullPath, VideoInfoProvider pVideoInfoCache) { VideoInfoProvider = pVideoInfoCache; ID = Guid.NewGuid(); Directory.CreateDirectory(Path.Combine(Settings.TempDirectory, ID.ToString())); _objProjectFile = new FileInfo(pFullPath); Config = new MeltConfig(this, VideoInfoProvider); if (TargetExists) { _objTargetInfo = VideoInfoProvider.Get(TargetPath); } if (SourceExists) { _objSourceInfo = VideoInfoProvider.Get(SourcePath); } Job = new MeltJob(this); // -- ToDo: pass null or the config for the job, not the project itself Job.ProgressChanged += (object sender, System.EventArgs e) => { ProjectChanged?.Invoke(sender, this); }; Job.StatusChanged += (object sender, JobStatus e) => { Log.Info("Project was changed - notify everyone"); switch (e) { case JobStatus.Failed: case JobStatus.Success: Reload(); break; case JobStatus.Paused: case JobStatus.Running: case JobStatus.Scheduled: case JobStatus.UnScheduled: break; } ProjectChanged?.Invoke(sender, this); }; }
public void LoadProject(Stream stream) { Project = Project.Load(stream); ProjectChanged?.Invoke(this, EventArgs.Empty); }
public void NotificationProjectChange() { ProjectChanged?.Invoke(this, null !); }
protected void OnRenamedProject(object sender, ProjectArgs e) { ProjectChanged.Invoke(sender, e); }
public void OnProjectChanged(object project) { ProjectChanged?.Invoke(this, new ProjectChangedEventArgs(project)); }
public void SetCurrentProject(Project project) { _currentProject = project; ProjectChanged?.Invoke(this, null); }
protected virtual void OnProjectChanged(EventArgs e) { ProjectChanged?.Invoke(this, e); }
public void NewProject() { Project = new Project(); ProjectChanged?.Invoke(this, EventArgs.Empty); }