Exemplo n.º 1
0
        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;
            //			};
        }
Exemplo n.º 2
0
        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;
//			};
        }
Exemplo n.º 3
0
        static SettingsManager()
        {
            RegisterAll();

            DefaultTorrentSettings = new TorrentSettings();
            EngineSettings         = new EngineSettings();
            Preferences            = new PreferencesSettings();
        }