public void SetFirst(SortableColumn column)
        {
            if (!this.Selectors.HasItems())
            {
                return;
            }

            if (column == StypeColumn)
            {
                // 列ヘッダーから艦種が選択されたときは、艦種 (降順) -> 艦名 (昇順) に設定
                // (ゲーム内の艦種ソートと同じ動作)

                this.Selectors[0].SafeUpdate(StypeColumn);
                this.Selectors[0].SafeUpdate(false);
                if (this.Selectors.Length >= 2)
                {
                    this.Selectors[1].SafeUpdate(NameColumn);
                    this.Selectors[1].SafeUpdate(true);
                }
            }
            else
            {
                this.Selectors[0].SafeUpdate(column);
                this.Selectors[0].SafeUpdate(!column.DefaultIsDescending);
            }

            this.UpdateSelectors();
        }
 public void Sort(SortableColumn column)
 {
     this.SortWorker.SetFirst(column);
     this.Update();
 }
 internal void SafeUpdate(SortableColumn column)
 {
     this._Current = column;
     this.RaisePropertyChanged(nameof(this.Current));
 }
Example #4
0
 public void Sort(SortableColumn column)
 {
     this.SortWorker.SetFirst(column);
     this.Update();
 }
 internal void SafeUpdate(SortableColumn column)
 {
     this._Current = column;
     this.RaisePropertyChanged("Current");
 }
        public void SetFirst(SortableColumn column)
        {
            if (!this.Selectors.HasItems()) return;

            if (this.Selectors[0].Current == column)
            {
                this.Selectors[0].SafeUpdate(this.Selectors[0].IsDescending);
            }
            else
            {
                if (column == StypeColumn)
                {
                    // 列ヘッダーから艦種が選択されたときは、艦種 (降順) -> 艦名 (昇順) に設定
                    // (ゲーム内の艦種ソートと同じ動作)

                    this.Selectors[0].SafeUpdate(StypeColumn);
                    this.Selectors[0].SafeUpdate(false);
                    if (this.Selectors.Length >= 2)
                    {
                        this.Selectors[1].SafeUpdate(NameColumn);
                        this.Selectors[1].SafeUpdate(true);
                    }
                }
                else
                {
                    this.Selectors[0].SafeUpdate(column);
                    this.Selectors[0].SafeUpdate(!column.DefaultIsDescending);
                }
            }

            this.UpdateSelectors();
        }