예제 #1
0
 public void OnRefreshStarted()
 {
     if (RefreshStarted != null)
     {
         RefreshStarted.Invoke(this, null);
     }
 }
예제 #2
0
        public void RefreshItems(bool resizeColumns)
        {
            RefreshStarted?.Invoke(this, EventArgs.Empty);

            _newItem = false;

            IEnumerable <TItem> query = _allItems;

            if (ItemFilter != null)
            {
                query = query.Where(ItemFilter);
            }

            if (resizeColumns)
            {
                ListView.BeginUpdate();
                try
                {
                    ListView.SetObjects(query);

                    ResizeListView(ListView);
                }
                finally
                {
                    ListView.EndUpdate();
                }
            }
            else
            {
                ListView.SetObjects(query);
            }

            RefreshFinished?.Invoke(this, EventArgs.Empty);
        }
예제 #3
0
 public void OnRefreshStarted()
 {
     OnRefreshStartedCalls++;
     if (this.RefreshStarted != null)
     {
         RefreshStarted.Invoke(this, new EventArgs());
     }
 }
예제 #4
0
        public void OnRefreshStart(BaseItem item)
        {
            //_logger.LogInformation("OnRefreshStart {0}", item.Id.ToString("N", CultureInfo.InvariantCulture));
            var id = item.Id;

            lock (_activeRefreshes)
            {
                _activeRefreshes[id] = 0;
            }

            RefreshStarted?.Invoke(this, new GenericEventArgs <BaseItem>(item));
        }
예제 #5
0
 /// <inheritdoc/>
 public void OnRefreshStart(BaseItem item)
 {
     _logger.LogDebug("OnRefreshStart {0}", item.Id.ToString("N", CultureInfo.InvariantCulture));
     _activeRefreshes[item.Id] = 0;
     RefreshStarted?.Invoke(this, new GenericEventArgs <BaseItem>(item));
 }