Example #1
0
        private void MovieView_ColumnClick(object sender, ColumnClickEventArgs e)
        {
            var columnName = MovieView.Columns[e.Column].Text;

            switch (columnName)
            {
            case "File":
            default:
                _movieList = _movieList.OrderBy(x => Path.GetFileName(x.Filename))
                             .ThenBy(x => x.SystemID)
                             .ThenBy(x => x.GameName)
                             .ThenBy(x => x.FrameCount)
                             .ToList();
                break;

            case "SysID":
                _movieList = _movieList.OrderBy(x => x.SystemID)
                             .ThenBy(x => Path.GetFileName(x.Filename))
                             .ThenBy(x => x.GameName)
                             .ThenBy(x => x.FrameCount)
                             .ToList();
                break;

            case "Game":
                _movieList = _movieList.OrderBy(x => x.GameName)
                             .ThenBy(x => Path.GetFileName(x.Filename))
                             .ThenBy(x => x.SystemID)
                             .ThenBy(x => x.FrameCount)
                             .ToList();
                break;

            case "Length (est.)":
                _movieList = _movieList.OrderBy(x => x.FrameCount)
                             .ThenBy(x => Path.GetFileName(x.Filename))
                             .ThenBy(x => x.SystemID)
                             .ThenBy(x => x.GameName)
                             .ToList();
                break;
            }
            if (_sortedCol == columnName && _sortReverse)
            {
                _movieList.Reverse();
                _sortReverse = false;
            }
            else
            {
                _sortReverse = true;
                _sortedCol   = columnName;
            }
            MovieView.Refresh();
        }
Example #2
0
        private void MovieView_ColumnClick(object sender, ColumnClickEventArgs e)
        {
            var columnName = MovieView.Columns[e.Column].Text;

            _movieList = ColumnSorts.AppliedTo(_movieList, columnName);
            if (_sortedCol == columnName && _sortReverse)
            {
                _movieList.Reverse();
                _sortReverse = false;
            }
            else
            {
                _sortReverse = true;
                _sortedCol   = columnName;
            }
            MovieView.Refresh();
        }
Example #3
0
 private void UpdateList()
 {
     MovieView.Refresh();
     MovieCount.Text = _movieList.Count + " movie"
                       + (_movieList.Count != 1 ? "s" : "");
 }
Example #4
0
 private void UpdateList()
 {
     MovieView.Refresh();
     MovieCount.Text = $"{_movieList.Count} {(_movieList.Count == 1 ? "movie" : "movies")}";
 }