public static bool SaveSettings(Settings settings) { CheckDirectory(); var theFile = string.Format("{0}\\Settings.txt", GetPath()); var serializer = new JavaScriptSerializer(); File.WriteAllText(theFile, serializer.Serialize(settings)); return true; }
public BitmapManager(string bitmapPath, BufferManager bufferManager) { _bitmapStream = new FileStream(bitmapPath, FileMode.OpenOrCreate, FileAccess.ReadWrite, FileShare.None); _bufferManager = bufferManager; _cacheBuffer = _bufferManager.TakeBuffer(BitmapManager.SectorSize); _settings = new Settings(this.ThisLock); }
public OverlayNetworkManager(AmoebaManager amoebaManager, BufferManager bufferManager) { _amoebaManager = amoebaManager; _bufferManager = bufferManager; _settings = new Settings(); _amoebaManager.CreateCapEvent = this.CreateCap; _amoebaManager.AcceptCapEvent = this.AcceptCap; }
public OverlayNetworkManager(OutoposManager outoposManager, BufferManager bufferManager) { _outoposManager = outoposManager; _bufferManager = bufferManager; _settings = new Settings(this.ThisLock); _outoposManager.CreateCapEvent = this.CreateCap; _outoposManager.AcceptCapEvent = this.AcceptCap; }
public DownloadManager(ConnectionsManager connectionsManager, CacheManager cacheManager, BufferManager bufferManager) { _connectionsManager = connectionsManager; _cacheManager = cacheManager; _bufferManager = bufferManager; _settings = new Settings(); _threadCount = Math.Max(1, Math.Min(System.Environment.ProcessorCount, 32) / 2); _cacheManager.BlockSetEvents += this.BlockSetThread; _cacheManager.BlockRemoveEvents += this.BlockRemoveThread; }
public TransfarLimitManager(AmoebaManager amoebaManager) { _amoebaManager = amoebaManager; _settings = new Settings(); }
public AutoBaseNodeSettingManager(OutoposManager outoposManager) { _outoposManager = outoposManager; _settings = new Settings(this.ThisLock); }
public TransfarLimitManager(OutoposManager outoposManager) { _outoposManager = outoposManager; _settings = new Settings(this.ThisLock); }
public TransfarLimitManager(AmoebaManager amoebaManager) { _amoebaManager = amoebaManager; _settings = new Settings(this.ThisLock); }
public void Init(Settings settings) { _settings = settings; _ChoiceGalleryAdvancedSettingsItems = new Choice(); ArrayListDataSet aryListDS = new ArrayListDataSet(); aryListDS.Add(new SettingsItem(0, _settings.DimUnselectedCovers, "Dim Unselected Covers",false)); aryListDS.Add(new SettingsItem(0, _settings.UseOnScreenAlpha, "Show Alpha Jump Bar", false)); aryListDS.Add(new SettingsItem(0, _settings.ShowMovieDetails, "Show Movie Details", false)); aryListDS.Add(new SettingsItem(0, _settings.ShowWatchedIcon, "Show Watched Icon", false)); aryListDS.Add(new SettingsItem(0, _settings.UseOriginalCoverArt, "Use Original Cover Art(may slow browsing)", true)); aryListDS.Add(new SettingsItem(1, _settings.CoverArtRows, "Cover Art Rows:", false)); aryListDS.Add(new SettingsItem(1, _settings.CoverArtSpacing, "Cover Art Spacing:", true)); aryListDS.Add(new SettingsItem(1, _settings.MainPageBackDropInterval, "Random Backdrop Interval:", false)); aryListDS.Add(new SettingsItem(3, _settings.MainPageBackDropAlpha, "Backdrop Opacity:", true)); _ChoiceGalleryAdvancedSettingsItems.Options = aryListDS; _ChoiceGalleryViewSettingsItems = new Choice(); ArrayListDataSet aryListDS2 = new ArrayListDataSet(); aryListDS2.Add(new SettingsItem(2, _settings.MovieView, "Movie Gallery View:", false)); aryListDS2.Add(new SettingsItem(2, _settings.MovieSort, "Movie Sort:", false)); aryListDS2.Add(new SettingsItem(2, _settings.StartPage, "Start Page:", false)); _ChoiceGalleryViewSettingsItems.Options = aryListDS2; _ChoiceFilterOptions=new Choice(); ArrayListDataSet aryListDS3=new ArrayListDataSet(); aryListDS3.Add(new CheckBox(_settings.ShowFilterActors, "Actors")); aryListDS3.Add(new CheckBox(_settings.ShowFilterCountry, "Country")); aryListDS3.Add(new CheckBox(_settings.ShowFilterDateAdded, "Date Added")); aryListDS3.Add(new CheckBox(_settings.ShowFilterDirectors, "Directors")); aryListDS3.Add(new CheckBox(_settings.ShowFilterGenres, "Genres")); aryListDS3.Add(new CheckBox(_settings.ShowFilterParentalRating, "Parental Rating")); aryListDS3.Add(new CheckBox(_settings.ShowFilterYear, "Release Year")); aryListDS3.Add(new CheckBox(_settings.ShowFilterRuntime, "Runtime")); aryListDS3.Add(new CheckBox(_settings.ShowFilterTags, "Tags")); aryListDS3.Add(new CheckBox(_settings.ShowFilterTrailers, "Trailers")); aryListDS3.Add(new CheckBox(_settings.ShowFilterUserRating, "User Rating")); aryListDS3.Add(new CheckBox(_settings.ShowFilterUnwatched, "Unwatched")); aryListDS3.Add(new CheckBox(_settings.ShowFilterFormat, "Video Format")); _ChoiceFilterOptions.Options = aryListDS3; _ChoiceExtenderSettingsItems = new Choice(); ArrayListDataSet aryListDS4 = new ArrayListDataSet(); aryListDS4.Add(new SettingsItem(4, _settings.ImpersonationUsername, "Impersonation Username:"******"Impersonation Password:"******"Number Of Seconds To Delay:", true)); aryListDS4.Add(new SettingsItem(0, _settings.TranscodeAVIFiles, "Transcode AVI Files", false)); aryListDS4.Add(new SettingsItem(0, _settings.TranscodeMKVFiles, "Transcode MKV Files", false)); aryListDS4.Add(new SettingsItem(0, _settings.TranscodeOGMFiles, "Transcode OGM Files", false)); aryListDS4.Add(new SettingsItem(0, _settings.PreserveAudioOnTranscode, "Preserve audio format on transcode of non DVD files", false)); aryListDS4.Add(new SettingsItem(0, _settings.DebugTranscoding, "Transcode ALL DVDs (DEBUG Only)", false)); _ChoiceExtenderSettingsItems.Options = aryListDS4; }
public ConnectionSettingManager(AmoebaManager amoebaManager) { _amoebaManager = amoebaManager; _settings = new Settings(); }
//#endif public ConnectionsManager(ClientManager clientManager, ServerManager serverManager, CacheManager cacheManager, BufferManager bufferManager) { _clientManager = clientManager; _serverManager = serverManager; _cacheManager = cacheManager; _bufferManager = bufferManager; _settings = new Settings(this.ThisLock); _routeTable = new Kademlia<Node>(512, 20); _connectionManagers = new LockedList<ConnectionManager>(); _messagesManager = new MessagesManager(); _messagesManager.GetLockNodesEvent = (object sender) => { lock (this.ThisLock) { return _connectionManagers.Select(n => n.Node).ToArray(); } }; _creatingNodes = new LockedList<Node>(); _waitingNodes = new VolatileHashSet<Node>(new TimeSpan(0, 0, 30)); _cuttingNodes = new VolatileHashSet<Node>(new TimeSpan(0, 10, 0)); _removeNodes = new VolatileHashSet<Node>(new TimeSpan(0, 30, 0)); _succeededUris = new VolatileHashSet<string>(new TimeSpan(1, 0, 0)); _downloadBlocks = new VolatileHashSet<Key>(new TimeSpan(0, 30, 0)); _pushBroadcastSignaturesRequestList = new VolatileHashSet<string>(new TimeSpan(0, 3, 0)); _pushUnicastSignaturesRequestList = new VolatileHashSet<string>(new TimeSpan(0, 3, 0)); _pushMulticastWikisRequestList = new VolatileHashSet<Wiki>(new TimeSpan(0, 3, 0)); _pushMulticastChatsRequestList = new VolatileHashSet<Chat>(new TimeSpan(0, 3, 0)); _relayBlocks = new VolatileHashSet<Key>(new TimeSpan(0, 30, 0)); _refreshTimer = new WatchTimer(this.RefreshTimer, new TimeSpan(0, 0, 5)); }
public AutoBaseNodeSettingManager(AmoebaManager amoebaManager) { _amoebaManager = amoebaManager; _settings = new Settings(this.ThisLock); }