public EditCollectionSettingsWindow(ICollectionSessionFactory collectionSessionFactory) : base(collectionSessionFactory) { InitializeComponent(); this.PopulateUI(this.CollectionManager.Settings); }
private void OpenCollection(string databasePath) { ICollectionSessionFactory newCollectionSessionFactory; ICollectionManager newCollectionManager; try { newCollectionSessionFactory = CollectionFactoryFactory.CreateFactory(databasePath); newCollectionManager = newCollectionSessionFactory.CreateCollectionManager(); if (newCollectionManager.Settings == null && !this.EditCollectionSettings(newCollectionSessionFactory)) { return; } } catch { Dialogs.Error("Can not open collection."); return; } this.CloseCollection(); this.collectionSessionFactory = newCollectionSessionFactory; this.collectionManager = newCollectionManager; this.SettingsManager.Settings.CollectionDatabasePath = newCollectionSessionFactory.DatabasePath; this.SettingsManager.Save(); this.mainCollectionView.CollectionSessionFactory = newCollectionSessionFactory; this.HasCollection = true; this.UpdateUI(); }
public ScanCollectionFolderWindow(ICollectionSessionFactory sessionFactory) : base(sessionFactory) { InitializeComponent(); this.scannerTask = new Task(this.ScannerTask); this.scannerTask.Start(); }
public StatisticsWindow(ICollectionSessionFactory collectionSessionFactory) : base(collectionSessionFactory) { InitializeComponent(); this.generator = new CollectionStatisticsGenerator(this.CollectionManager); this.generator.ProgressChanged += ProgressBarUpdater.CreateHandler(this.Dispatcher, this.busyIndicator, () => this.shouldCancel); }
public FillReleaseDiscogsMasterIdsWindow(ICollectionSessionFactory collectionSessionFactory) : base(collectionSessionFactory) { InitializeComponent(); this.workerTask = new Task(this.Worker); this.workerTask.Start(); }
public TestImportExportReleases(ICollectionSessionFactory collectionSessionFactory) : base(collectionSessionFactory) { InitializeComponent(); this.progress = new Progress <double>(); this.progress.ProgressChanged += progress_ProgressChanged; new Task(Scanner).Start(); }
public TestImportExportReleases(ICollectionSessionFactory collectionSessionFactory) : base(collectionSessionFactory) { InitializeComponent(); this.progress = new Progress<double>(); this.progress.ProgressChanged += progress_ProgressChanged; new Task(Scanner).Start(); }
public EncodingTargetsSettingsWindow(ICollectionSessionFactory collectionSessionFactory) : base(collectionSessionFactory) { this.items = new ObservableCollection <EncodingTargetListViewItem>(); this.LoadItems(); InitializeComponent(); this.listViewTargets.ItemsSource = this.items; }
public EncodingTargetsSettingsWindow(ICollectionSessionFactory collectionSessionFactory) : base(collectionSessionFactory) { this.items = new ObservableCollection<EncodingTargetListViewItem>(); this.LoadItems(); InitializeComponent(); this.listViewTargets.ItemsSource = this.items; }
public SyncEncodingTargetWindow(ICollectionSessionFactory collectionSessionFactory, EncodingTarget encodingTarget) : base(collectionSessionFactory) { this.encodingTarget = encodingTarget; InitializeComponent(); this.textLameVersion.Text = LameWriter.EncoderVersion; this.networkBox.CollectionManager = this.CollectionManager; this.networkBox.SettingsManager = this.SettingsManager; this.scanWrkerTask = new Task(this.WorkerTask); this.scanWrkerTask.Start(); }
public ReplaceReleaseFilesWindow(ICollectionSessionFactory collectionSessionFactory, string releaseId) : base(collectionSessionFactory) { this.release = this.CollectionManager.GetReleaseById(releaseId); InitializeComponent(); this.networkBox.CollectionManager = this.CollectionManager; this.networkBox.SettingsManager = this.SettingsManager; this.items = new ObservableCollection <IImportSourceItem>(); this.items.CollectionChanged += this.items_CollectionChanged; this.listTracks.ItemsSource = release.Tracklist; this.listImportItems.ItemsSource = this.items; }
public ReplaceReleaseFilesWindow(ICollectionSessionFactory collectionSessionFactory, string releaseId) : base(collectionSessionFactory) { this.release = this.CollectionManager.GetReleaseById(releaseId); InitializeComponent(); this.networkBox.CollectionManager = this.CollectionManager; this.networkBox.SettingsManager = this.SettingsManager; this.items = new ObservableCollection<IImportSourceItem>(); this.items.CollectionChanged += this.items_CollectionChanged; this.listTracks.ItemsSource = release.Tracklist; this.listImportItems.ItemsSource = this.items; }
private void CloseCollection() { if (this.collectionManager != null) { this.collectionManager.Dispose(); this.collectionManager = null; } if (this.collectionSessionFactory != null) { this.collectionSessionFactory.Dispose(); this.collectionSessionFactory = null; } this.mainCollectionView.CollectionSessionFactory = null; this.HasCollection = false; this.UpdateUI(); }
public MusicDatabaseWindow(ICollectionSessionFactory collectionSessionFactory) { this.WindowStartupLocation = WindowStartupLocation.CenterOwner; this.Closed += new EventHandler(MusicDatabaseWindow_Closed); this.SettingsManager = new SettingsManager(); if (this.SaveWindowSettings) { this.SettingsManager.ManageWindowSettings(this); } if (collectionSessionFactory != null) { this.CollectionSessionFactory = collectionSessionFactory; } CollectionManagerGlobal.CollectionChanged += new EventHandler(CollectionManager_CollectionChanged); SettingsManager.SettingsChanged += new EventHandler(SettingsManager_SettingsChanged); }
public ImportTracksWindow(ICollectionSessionFactory collectionSessionFactory) : base(collectionSessionFactory) { this.DataContext = this; this.Release = new ImportReleaseItem(); this.DatabaseRelease = new Release(); InitializeComponent(); this.detailsEditor.Release = this.DatabaseRelease; this.additionalFilesEditor.Release = this.DatabaseRelease; this.imagesEditor.Release = this.DatabaseRelease; this.imagesEditor.CollectionManager = this.CollectionManager; this.networkBox.CollectionManager = this.CollectionManager; this.networkBox.SettingsManager = this.SettingsManager; this.AddDisc(); }
public AudioFormatAnalysisWindow(ICollectionSessionFactory factory) : base(factory) { this.bucketCollection = new FormatBucketCollection(); this.localBuckets = new FormatBucketCollection(); this.fileBuckets = new ObservableCollection <FileBucket>(); this.localFileBuckets = new ObservableCollection <FileBucket>(); InitializeComponent(); this.listFormats.ItemsSource = this.bucketCollection; this.listFiles.ItemsSource = this.fileBuckets; this.ProgressChanged += ProgressBarUpdater.CreateHandler(this.Dispatcher, this.busyIndicator, () => false, p => { this.bucketCollection.Add(this.localBuckets); this.localBuckets.Clear(); this.fileBuckets.AddRange(this.localFileBuckets); this.localFileBuckets.Clear(); }); new Task(this.CalculateAudioFormats).Start(); }
public EditReleaseWindow(ICollectionSessionFactory sessionFactory, string releaseId) : base(sessionFactory) { this.release = this.CollectionManager.GetReleaseById(releaseId); InitializeComponent(); this.detailsEditor.Release = this.release; this.imagesEditor.CollectionManager = this.CollectionManager; this.imagesEditor.Release = this.release; this.additionalFilesEditor.Release = this.release; for (int i = 1; i <= this.release.DiscCount; ++i) { EditReleaseDiscEditor discEditor = new EditReleaseDiscEditor(); discEditor.SetData(this.release, i); this.tabs.Items.Add(new TabItem() { Header = "Disc " + i, Content = discEditor }); } }
public MissingCoverArtFillHelper(MusicDatabaseWindow parentWindow, ICollectionSessionFactory collectionSessionFactory) : base(parentWindow, collectionSessionFactory) { }
public DirectoryImportHelper(MusicDatabaseWindow parentWindow, ICollectionSessionFactory collectionSessionFactory) : base(parentWindow, collectionSessionFactory) { }
public HelperBase(MusicDatabaseWindow parentWindow, ICollectionSessionFactory collectionSessionFactory) { this.ParentWindow = parentWindow; this.CollectionManager = collectionSessionFactory.CreateCollectionManager(); }
public DynamicRangeUpdater(MusicDatabaseWindow parentWindow, SettingsManager settingsManager, ICollectionSessionFactory collectionSessionFactory) : base(parentWindow, collectionSessionFactory) { this.settingsManager = settingsManager; }
private bool EditCollectionSettings(ICollectionSessionFactory collectionSessionFactory) { EditCollectionSettingsWindow editCollectionSettingsWindow = new EditCollectionSettingsWindow(collectionSessionFactory); return editCollectionSettingsWindow.ShowDialog(this) == true; }
public ReplayGainUpdateHelper(MusicDatabaseWindow parentWindow, SettingsManager settingsManager, ICollectionSessionFactory collectionSessionFactory) : base(parentWindow, collectionSessionFactory) { this.settingsManager = settingsManager; }
public ArchivedExportHelper(MusicDatabaseWindow parentWindow, ICollectionSessionFactory collectionSessionFactory) : base(parentWindow, collectionSessionFactory) { }
private bool EditCollectionSettings(ICollectionSessionFactory collectionSessionFactory) { EditCollectionSettingsWindow editCollectionSettingsWindow = new EditCollectionSettingsWindow(collectionSessionFactory); return(editCollectionSettingsWindow.ShowDialog(this) == true); }