示例#1
0
        protected override void OnExecute(SmartListView list, CommandEventArgs e)
        {
            bool extend = ((Control.ModifierKeys & Keys.Shift) != 0);

            int n = (int)(e.Command - VisualGitCommand.ListViewSort0);
            SmartColumn column = list.AllColumns[n];

            if (list.SortColumns.Contains(column))
            {
                list.SortColumns.Remove(column);

                list.UpdateSortGlyphs();

                if (list.SortColumns.Count > 0)
                    list.Sort();
            }
            else if (!extend)
            {
                list.SortColumns.Clear();
                list.SortColumns.Add(column);
                list.UpdateSortGlyphs();
                list.Sort();
            }
            else
            {
                list.SortColumns.Add(column);
                list.UpdateSortGlyphs();
                list.Sort();
            }
        }
示例#2
0
        protected override void OnExecute(SmartListView list, CommandEventArgs e)
        {
            bool extend = ((Control.ModifierKeys & Keys.Shift) != 0);

            int         n      = (int)(e.Command - AnkhCommand.ListViewSort0);
            SmartColumn column = list.AllColumns[n];

            if (list.SortColumns.Contains(column))
            {
                list.SortColumns.Remove(column);

                list.UpdateSortGlyphs();

                if (list.SortColumns.Count > 0)
                {
                    list.Sort();
                }
            }
            else if (!extend)
            {
                list.SortColumns.Clear();
                list.SortColumns.Add(column);
                list.UpdateSortGlyphs();
                list.Sort();
            }
            else
            {
                list.SortColumns.Add(column);
                list.UpdateSortGlyphs();
                list.Sort();
            }
        }
示例#3
0
        protected override void OnExecute(SmartListView list, CommandEventArgs e)
        {
            bool value = (e.Command == AnkhCommand.ListViewSortDescending);

            foreach (SmartColumn sc in list.SortColumns)
            {
                sc.ReverseSort = value;
            }
            list.UpdateSortGlyphs();
            list.Sort();
        }
示例#4
0
        protected override void OnExecute(SmartListView list, CommandEventArgs e)
        {
            bool value = (e.Command == AnkhCommand.ListViewSortDescending);

            foreach (SmartColumn sc in list.SortColumns)
            {
                sc.ReverseSort = value;
            }
            list.UpdateSortGlyphs();
            list.Sort();
        }