public PreferencesDialog(MainWindow mainWindow) { this.engineSettings = SettingsManager.EngineSettings; this.prefSettings = SettingsManager.Preferences; this.labelController = mainWindow.LabelController; this.trayIcon = mainWindow.TrayIcon; this.interfaceSettings = mainWindow.InterfaceSettings; Build(); buildFoldersPanel(); buildImportPanel(); buildLabelPage(); buildConnectionPage(); restorePreferences(); BuildGeneralPage(); SetNames (); upnpCheckBox.Toggled += OnUpnpCheckBoxToggled; spinMaxActive.Sensitive = false; spinMaxSeed.Sensitive = false; // spinMaxActive.ValueChanged += delegate { // DownloadQueueService queue = ServiceManager.Get <DownloadQueueService> (); // queue.MaxActive = spinMaxActive.ValueAsInt; // }; spinMaxDownload.ValueChanged += delegate { DownloadQueueService queue = ServiceManager.Get <DownloadQueueService> (); queue.MaxDownloads = spinMaxActive.ValueAsInt; }; // spinMaxSeed.ValueChanged += delegate { // DownloadQueueService queue = ServiceManager.Get <DownloadQueueService> (); // queue.MaxSeeds = spinMaxActive.ValueAsInt; // }; }
public PreferencesDialog(MainWindow mainWindow) { this.engineSettings = SettingsManager.EngineSettings; this.prefSettings = SettingsManager.Preferences; this.labelController = mainWindow.LabelController; this.trayIcon = mainWindow.TrayIcon; this.interfaceSettings = mainWindow.InterfaceSettings; Build(); buildFoldersPanel(); buildImportPanel(); buildLabelPage(); buildConnectionPage(); restorePreferences(); BuildGeneralPage(); SetNames(); upnpCheckBox.Toggled += OnUpnpCheckBoxToggled; spinMaxActive.Sensitive = false; spinMaxSeed.Sensitive = false; // spinMaxActive.ValueChanged += delegate { // DownloadQueueService queue = ServiceManager.Get <DownloadQueueService> (); // queue.MaxActive = spinMaxActive.ValueAsInt; // }; spinMaxDownload.ValueChanged += delegate { DownloadQueueService queue = ServiceManager.Get <DownloadQueueService> (); queue.MaxDownloads = spinMaxActive.ValueAsInt; }; // spinMaxSeed.ValueChanged += delegate { // DownloadQueueService queue = ServiceManager.Get <DownloadQueueService> (); // queue.MaxSeeds = spinMaxActive.ValueAsInt; // }; }
static SettingsManager() { RegisterAll(); DefaultTorrentSettings = new TorrentSettings(); EngineSettings = new EngineSettings(); Preferences = new PreferencesSettings(); }