Пример #1
0
        }     // Equals

        public bool Equals(UiBroadcastListSortColumn column)
        {
            if (this.Column != column.Column)
            {
                return(false);
            }
            if (this.IsAscending == column.IsAscending)
            {
                return(true);
            }
            // special case
            if (this.Column == UiBroadcastListColumn.None)
            {
                return(true);
            }

            return(false);
        } // Equals
Пример #2
0
        } // ListView_SelectedIndexChanged

        void ListView_ColumnClick(object sender, ColumnClickEventArgs e)
        {
            var sortColumn = new UiBroadcastListSortColumn();

            sortColumn.Column      = Settings.CurrentColumns[e.Column];
            sortColumn.IsAscending = sortColumn.Column == SelectedSort.Column? !SelectedSort.IsAscending : true;

            if (Settings.UseGlobalSortColumns)
            {
                Settings.GlobalSortColumns = ServiceSortComparer.GetSuggestedSortColumns(sortColumn.Column, sortColumn.IsAscending, 3);
            }
            else
            {
                Settings[Settings.CurrentMode].Sort = ServiceSortComparer.GetSuggestedSortColumns(sortColumn.Column, sortColumn.IsAscending, 3);
            } // if-else

            SaveSettings(Settings);
            ApplySorting();
        } // ListView_ColumnClick