public AutoDownloadSettings(ApplicationDataContainer container) { _disabled = container.GetBoolean("disabled", false); _photos = (AutoDownloadMode)container.GetInt32("photos", (int)AutoDownloadMode.All); _videos = (AutoDownloadMode)container.GetInt32("videos", (int)AutoDownloadMode.All); _maximumVideoSize = container.GetInt64("maxVideoSize", 10 * 1024 * 1024); _documents = (AutoDownloadMode)container.GetInt32("documents", (int)AutoDownloadMode.All); _maximumDocumentSize = container.GetInt64("maxDocumentSize", 3 * 1024 * 1024); }
public AutoDownloadPreferences(ApplicationDataContainer container) { _disabled = container.GetBoolean("disabled", false); _photos = (AutoDownloadMode)container.GetInt32("photos", (int)AutoDownloadMode.All); _videos = (AutoDownloadMode)container.GetInt32("videos", (int)AutoDownloadMode.None); _maximumVideoSize = container.GetInt32("maxVideoSize", 10); _documents = (AutoDownloadMode)container.GetInt32("documents", (int)AutoDownloadMode.None); _maximumDocumentSize = container.GetInt32("maxDocumentSize", 10); _voiceNotes = (AutoDownloadMode)container.GetInt32("voiceNotes", (int)AutoDownloadMode.All); _videoNotes = (AutoDownloadMode)container.GetInt32("videoNotes", (int)AutoDownloadMode.All); _animations = (AutoDownloadMode)container.GetInt32("animations", (int)AutoDownloadMode.All); }