Exemple #1
0
 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);
 }
Exemple #2
0
 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);
     _audios              = (AutoDownloadMode)container.GetInt32("audios", (int)AutoDownloadMode.None);
     _animations          = (AutoDownloadMode)container.GetInt32("animations", (int)AutoDownloadMode.All);
 }