Esempio n. 1
0
        private void Sort(object o)
        {
            Sorter s = o as Sorter;

            if (s == null)
            {
                return;
            }

            if (s.Direction == ListSortDirection.Ascending)
            {
                Sorters.Add(s);
            }
            else if (s.Direction == ListSortDirection.Descending)
            {
                var current_sorter = FindSorter(s.Name);
                current_sorter.Direction = ListSortDirection.Descending;
            }
            else
            {
                var current_sorter = FindSorter(s.Name);
                Sorters.Remove(current_sorter);
            }

            aggregate_comparer.AddComparer(new TextComparer());
            aggregate_comparer.Refresh();

            // Here the view should be refreshed
            // - Start a timer, 100 ms countdown
            // -- Tick should trigger a refresh
        }