//master constructor, where all property listings, both displayed and available, are specified
		public StashSortData( StashSortEntry[] displayentries, StashSortEntry[] availableentries )
		{
			if( availableentries != null )
			{
				_AvailableColumns = new List<StashSortEntry>( availableentries );
			}
			else
			{
				_AvailableColumns = new List<StashSortEntry>();
			}
			
			//special case: the first column in all Stash Sort listings shows the item graphic and the "best name" for the item
			this.Add( new StashSortEntry( "Item", "best name", 0, 100 ) );

			if( displayentries != null )
			{
				//add in all user-specified columns			
				foreach( StashSortEntry entry in displayentries )
				{
					entry.X = Width;
					this.Add( entry );
				}
			}
			
		}
        public virtual int Add(StashSortEntry entry)
        {
            int add = List.Add(entry);

            //this forces a refresh
            return(add);
        }
        //used for reordering sort data columns - shift column right
        public void ShiftColumnRight(int index)
        {
            if (index < Count - 1 && index > 0)
            {
                StashSortEntry entry = this[index];

                Remove(entry);

                Insert(index + 1, entry);

                RefreshPositions();
            }
        }
        //used for reordering sort data columns - shift column left
        public void ShiftColumnLeft(int index)
        {
            if (index > 1)
            {
                StashSortEntry entry = this[index];

                Remove(entry);

                Insert(index - 1, entry);

                RefreshPositions();
            }
        }
 public virtual void Remove(StashSortEntry entry)
 {
     List.Remove(entry);
 }
 public virtual void Insert(int index, StashSortEntry entry)
 {
     List.Insert(index, entry);
 }
 public virtual int IndexOf(StashSortEntry entry)
 {
     return(List.IndexOf(entry));
 }
 public virtual bool Contains(StashSortEntry entry)
 {
     return(List.Contains(entry));
 }
Esempio n. 9
0
 //default constructor: all displayed property listings, no extra available ones
 public StashSortData( StashSortEntry[] displayentries )
     : this(displayentries, null)
 {
 }
Esempio n. 10
0
 public virtual void Remove( StashSortEntry entry )
 {
     List.Remove( entry );
 }
Esempio n. 11
0
 public virtual void Insert( int index, StashSortEntry entry )
 {
     List.Insert( index, entry );
 }
Esempio n. 12
0
 public virtual int IndexOf( StashSortEntry entry )
 {
     return List.IndexOf( entry );
 }
Esempio n. 13
0
 public virtual void CopyTo( StashSortEntry[] array, int index )
 {
     List.CopyTo( array, index );
 }
Esempio n. 14
0
 public virtual bool Contains( StashSortEntry entry )
 {
     return List.Contains( entry);
 }
Esempio n. 15
0
        public virtual int Add( StashSortEntry entry )
        {
            int add = List.Add( entry );

            //this forces a refresh
            return add;
        }