TrashSelectorViewModel.cs #1

  • //
  • guest/
  • christoph_leithner/
  • piper/
  • main/
  • windows/
  • R1.1/
  • Perforce/
  • ViewModel/
  • TrashSelectorViewModel.cs
  • View
  • Commits
  • Open Download .zip Download (1 KB)
//
// Copyright 2014 Perforce Software Inc.
//

using Perforce.Helper;
using Perforce.View;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Perforce.ViewModel {
    public class TrashSelectorViewModel : SidebarSelectorViewModelBase {

        public TrashSelectorViewModel(SidebarSelector view) : base(view) {
            //this.Grid = new System.Windows.Controls.Grid();
            //UpdateView();
        }

        private void UpdateView() {
            GridHelper.InitializeGrid(View);
            //var lastColumn = GridHelper.GetLastColumnDisplay(Grid);
            //if (lastColumn != null) {
            //    LabelCount = lastColumn.Model.ListingItems.Count;
            //}
            //var files = ListingHelper.GetTrashFiles(0);
            //if (files.Count > 0) {
            //    GridHelper.SetColumnInGrid(this.Grid, 0, null, files);
            //} else {
            //    GridHelper.ClearGrid(this.Grid);
            //}
            //this.LabelCount = files.Count;
        }

        public override SELECTOR_TYPE SelectorType {
            get { return SELECTOR_TYPE.TRASH; }
        }

        public override void Refresh() {
            UpdateView();
            base.Refresh();
        }
    }
}
# Change User Description Committed
#1 16817 christoph_leithner "Forking branch Main of perforce-software-piper to christoph_leithner-piper."
//guest/perforce_software/piper/main/windows/R1.1/Perforce/ViewModel/TrashSelectorViewModel.cs
#1 16507 perforce_software Move to main branch.
//guest/perforce_software/piper/windows/R1.1/Perforce/ViewModel/TrashSelectorViewModel.cs
#1 11256 alan_petersen Populate //guest/perforce_software/piper/windows/R1.1/...
from //guest/perforce_software/piper/windows/main/....
//guest/perforce_software/piper/windows/main/Perforce/ViewModel/TrashSelectorViewModel.cs
#1 11255 alan_petersen Rename/move file(s)
//guest/perforce_software/piper/windows/Perforce/ViewModel/TrashSelectorViewModel.cs
#1 10761 alan_petersen initial drop of Piper for Windows....

this version still has _many_ bugs (er... i mean "unintended features") but I will be updating it over the next week as more stability is added.