private void OnTagSelected(DBTagInfo tag) { Files.Clear(); if (!currentJob.IsNull()) { JobManager.Instance.ForceStop(currentJob); currentJob = null; } currentJob = LoadMediasJob.Create(new LoadMediasJob.LoadPattern() { Category = LoadMediasJob.Category.Tag, keyword = tag.ID.ToString() }); JobManager.Instance.AddJob(currentJob); JobManager.Instance.ForceStart(currentJob); }
private void MonitoredFoldersSelected(IFolder iFolder) { Files.Clear(); //StartBackgroundWork(iFolder); if (!currentJob.IsNull()) { JobManager.Instance.ForceStop(currentJob); currentJob = null; } currentJob = LoadMediasJob.Create(new LoadMediasJob.LoadPattern() { Category = LoadMediasJob.Category.Folder, keyword = iFolder.FullPath }); JobManager.Instance.AddJob(currentJob); JobManager.Instance.ForceStart(currentJob); }