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

            //this forces a refresh
            return add;
        }