public SyncNewRuleAddedNotification(string message, long startingSize, UIGasGauge gasGauge)
     : base(message, NotificationTask.Sync, NotificationState.OneShot)
 {
     this._gauge   = gasGauge;
     this._oldSize = startingSize;
 }
Beispiel #2
0
 public SyncGroupList(
     IModelItemOwner parent,
     UIDevice device,
     SyncRulesView snapshot,
     bool inOverfill)
     : base(parent)
 {
     this._device            = device;
     this._snapshot          = snapshot;
     this._inOverfill        = inOverfill;
     this._inManagement      = parent is DeviceManagement;
     this._commitDelegate    = new ProxySettingDelegate(this.CommitChanges);
     this._gauge             = this._snapshot == null ? new UIGasGauge(this, null) : new UIGasGauge(this, this._snapshot.PredictedGasGauge);
     this._existingRulesList = new Dictionary <SyncRuleDetails, SyncGroup>(new SyncRuleDetailsHasher());
     this._complexRulesList  = new Dictionary <int, SyncGroup>();
     this._schemas           = new List <SchemaSyncGroup>(8);
     this._music             = new DetailsBackedSchemaSyncGroup(this, this._snapshot, SyncCategory.Music, this._inOverfill);
     this._schemas.Add(this._music);
     this._video = new DetailsBackedSchemaSyncGroup(this, this._snapshot, SyncCategory.Video, this._inOverfill);
     this._schemas.Add(this._video);
     this._photo = new DetailsBackedSchemaSyncGroup(this, this._snapshot, SyncCategory.Photo, this._inOverfill);
     this._schemas.Add(this._photo);
     this._podcast = new DetailsBackedSchemaSyncGroup(this, this._snapshot, SyncCategory.Podcast, this._inOverfill);
     this._schemas.Add(this._podcast);
     if (this.Device.UserId != 0)
     {
         if (FeatureEnablement.IsFeatureEnabled(Features.eSocial) && device.SupportsUserCards)
         {
             this._friend = new DetailsBackedSchemaSyncGroup(this, this._snapshot, SyncCategory.Friend, this._inOverfill);
             this._schemas.Add(this._friend);
         }
         if (FeatureEnablement.IsFeatureEnabled(Features.eChannels) && device.SupportsChannels)
         {
             this._channel = new DetailsBackedSchemaSyncGroup(this, this._snapshot, SyncCategory.Channel, this._inOverfill);
             this._schemas.Add(this._channel);
         }
     }
     if (FeatureEnablement.IsFeatureEnabled(Features.eGames) && this.Device.SupportsSyncApplications)
     {
         this._application = new DetailsBackedSchemaSyncGroup(this, this._snapshot, SyncCategory.Application, this._inOverfill);
         this._schemas.Add(this._application);
     }
     if (this.InOverfill)
     {
         this._guest     = new GuestSchemaSyncGroup(this, this.GasGauge.GuestSpace);
         this._audiobook = new DetailsBackedSchemaSyncGroup(this, this._snapshot, SyncCategory.Audiobook, this._inOverfill);
         this._schemas.Add(this._audiobook);
     }
     if (this._snapshot == null)
     {
         return;
     }
     this._snapshot.ItemAddedEvent   += new SyncRulesViewItemAddedHandler(this.ItemAdded);
     this._snapshot.ItemUpdatedEvent += new SyncRulesViewItemUpdatedHandler(this.ItemUpdated);
     if (this._snapshot.Count <= 0)
     {
         return;
     }
     for (int indexInRulesSnapshot = 0; indexInRulesSnapshot < this._snapshot.Count; ++indexInRulesSnapshot)
     {
         this.AddExistingSyncGroup(indexInRulesSnapshot);
     }
 }