コード例 #1
0
        public void UpdateListView(CASCFolder baseEntry, NoFlickerListView fileList, string filter)
        {
            Wildcard wildcard = new Wildcard(filter, false, RegexOptions.IgnoreCase);

            // Sort
            baseEntry.Entries = baseEntry.EntriesMirror.Where(v => v.Value is CASCFolder || (v.Value is CASCFile && wildcard.IsMatch(v.Value.Name))).
                                OrderBy(v => v.Value, Sorter).ToDictionary(pair => pair.Key, pair => pair.Value);

            // Update
            fileList.Tag             = baseEntry;
            fileList.VirtualListSize = 0;
            fileList.VirtualListSize = baseEntry.Entries.Count;

            if (fileList.VirtualListSize > 0)
            {
                fileList.EnsureVisible(0);
                fileList.SelectedIndex = 0;
                fileList.FocusedItem   = fileList.Items[0];
            }
        }
コード例 #2
0
        public void UpdateListView(CASCFolder baseEntry, NoFlickerListView fileList, string filter)
        {
            Wildcard wildcard = new Wildcard(filter, false, RegexOptions.IgnoreCase);

            // Sort
            _displayedEntries = baseEntry.Entries.Where(v => v.Value is CASCFolder || (v.Value is CASCFile && wildcard.IsMatch(v.Value.Name))).
                                OrderBy(v => v.Value, Sorter).Select(kv => kv.Value).ToList();

            _currentFolder = baseEntry;

            // Update
            fileList.VirtualListSize = 0;
            fileList.VirtualListSize = _displayedEntries.Count;

            if (fileList.VirtualListSize > 0)
            {
                fileList.EnsureVisible(0);
                fileList.SelectedIndex = 0;
                fileList.FocusedItem   = fileList.Items[0];
            }
        }
コード例 #3
0
ファイル: SearchForm.cs プロジェクト: lyragosa/aleph
        private void button1_Click(object sender, EventArgs e)
        {
            if (filelist.SelectedIndex < 0)
            {
                return;
            }

            var item = filelist.FindItemWithText(textBox1.Text, false, filelist.SelectedIndex, true);

            if (item != null)
            {
                filelist.EnsureVisible(item.Index);
                filelist.SelectedIndex = item.Index;
                filelist.FocusedItem   = item;
            }
            else
            {
                MessageBox.Show(string.Format("Can't find:'{0}'", textBox1.Text),
                                "CASCExplorer",
                                MessageBoxButtons.OK,
                                MessageBoxIcon.Information);
            }
        }
コード例 #4
0
        public void UpdateListView(CASCFolder baseEntry, NoFlickerListView fileList, string filter)
        {
            Wildcard wildcard = new Wildcard(filter, false, RegexOptions.IgnoreCase);

            // Sort
            _displayedEntries = baseEntry.Entries.Where(v => v.Value is CASCFolder || (v.Value is CASCFile && wildcard.IsMatch(v.Value.Name))).
                OrderBy(v => v.Value, Sorter).Select(kv => kv.Value).ToList();

            _currentFolder = baseEntry;

            // Update
            fileList.VirtualListSize = 0;
            fileList.VirtualListSize = _displayedEntries.Count;

            if (fileList.VirtualListSize > 0)
            {
                fileList.EnsureVisible(0);
                fileList.SelectedIndex = 0;
                fileList.FocusedItem = fileList.Items[0];
            }
        }
コード例 #5
0
ファイル: CASCViewHelper.cs プロジェクト: aeo24/WoWMap
        public void UpdateListView(CASCFolder baseEntry, NoFlickerListView fileList, string filter)
        {
            Wildcard wildcard = new Wildcard(filter, false, RegexOptions.IgnoreCase);

            // Sort
            baseEntry.Entries = baseEntry.EntriesMirror.Where(v => v.Value is CASCFolder || (v.Value is CASCFile && wildcard.IsMatch(v.Value.Name))).
                OrderBy(v => v.Value, Sorter).ToDictionary(pair => pair.Key, pair => pair.Value);

            // Update
            fileList.Tag = baseEntry;
            fileList.VirtualListSize = 0;
            fileList.VirtualListSize = baseEntry.Entries.Count;

            if (fileList.VirtualListSize > 0)
            {
                fileList.EnsureVisible(0);
                fileList.SelectedIndex = 0;
                fileList.FocusedItem = fileList.Items[0];
            }
        }