private void RefreshBox(Uri uri) { _currentUri = uri; dirView.Items.Clear(); if (_walking.ContainsKey(uri)) { List <ListViewItem> items = _walking[uri]; if (items != null) { SetView(items.ToArray()); } else { dirView.Items.Add("<loading>"); } } else { dirView.Items.Add("<loading>"); } lock (_running) { if (_running.ContainsKey(uri)) { return; } _running[uri] = uri; // Mark as walking if (!_loading) { if (_busy == null) { _busy = new BusyOverlay(dirView, AnchorStyles.Right | AnchorStyles.Top); } _loading = true; _busy.Show(); } } AnkhAction fill = delegate() { OnFill(uri); }; fill.BeginInvoke(null, null); }
void ShowBusyIndicator() { if (InvokeRequired) { BeginInvoke(new AnkhAction(ShowBusyIndicator)); return; } if (_busyOverlay == null) { _busyOverlay = new BusyOverlay(syncView, AnchorStyles.Bottom | AnchorStyles.Right); } _busyOverlay.Show(); }