public DetailsBackedSchemaSyncGroup( SyncGroupList list, SyncRulesView view, SyncCategory type, bool inOverfill) : base(list, type) { this._view = view; this._index = -1; this._inOverfill = inOverfill; this._resortTimer = new Timer(this); this._resortTimer.AutoRepeat = false; this._resortTimer.Tick += new EventHandler(this.OnResortTimerTick); this._resortTimer.Interval = 527; this._masterList = new System.Collections.Generic.List <SyncGroup>(); this._sortedList = new System.Collections.Generic.List <SyncGroup>(); this._active = true; }
public ExistingSyncGroup( SyncGroupList parentList, SyncRulesView view, int index, bool isExpandedEntry) : base(parentList) { this._details = view.GetItem(index); this._view = view; this._index = index; this._isExpanded = isExpandedEntry; this.UpdateTitle(); if (!this.IsComplex) { return; } this.UpdateComplexType(); this._originalComplexRuleName = this.Title; this._originalComplexRuleSetup = new AutoPlaylistBuilder(this.ID); }
public ExistingSyncGroup(SyncGroupList parentList, SyncRulesView view, int index) : this(parentList, view, index, false) { }
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); } }