Ejemplo n.º 1
0
        private void LoadAutoCompleteCore(CancellationToken Token)
        {
            var CancellationTokenSource = this.CancellationTokenSource;

            try
            {
                this.CancellationTokenSource.Token.ThrowIfCancellationRequested();
                foreach (var Item in this.ExistingFileInfo.Directory.EnumerateFiles())
                {
                    this.CancellationTokenSource.Token.ThrowIfCancellationRequested();
                    if (!ImageFileUtils.IsSkippedExtension(Item.Extension))
                    {
                        this._AutoCompleteList.Add(System.IO.Path.GetFileNameWithoutExtension(Item.Name));
                    }
                }
                this.SetNearbyMatch();
            }
            catch (OperationCanceledException)
            {
                throw;
            }
            catch (Exception)
            {
            }
        }
        private void LoadAutoCompleteCore(CancellationToken Token)
        {
            var CancellationTokenSource = this.CancellationTokenSource;

            try
            {
                this.CancellationTokenSource.Token.ThrowIfCancellationRequested();
                foreach (var Item in this.ActiveFiles)
                {
                    this.CancellationTokenSource.Token.ThrowIfCancellationRequested();
                    if (!ImageFileUtils.IsSkippedExtension(Item.Extension))
                    {
                        this._AutoCompleteList.Add(Item);
                    }
                }
            }
            catch (OperationCanceledException)
            {
                throw;
            }
            catch (Exception)
            {
            }
        }