Beispiel #1
0
 /// <summary>
 /// Format an item for writing to a file.
 /// </summary>
 /// <param name="item">The item to be formatted.</param>
 /// <returns>A string representation of the item.</returns>
 protected override string FormatItem( RBArtItem item )
 {
     return String.Format( "{0}\t{1}", item.ID, item.Title );
 }
Beispiel #2
0
        /// <summary>
        /// Add an item of art to the art list.
        /// </summary>
        /// <param name="item">The item to add.</param>
        protected void AddArtItemToList( RBArtItem item )
        {
            if ( lvArt.InvokeRequired )
            {
                Invoke( new ArtItemAddFunction( AddArtItemToList ), new object[] { item } );
            }
            else
            {
                // Create the ListView item that'll hold the details of the item of art.
                ListViewItem lvItem = new ListViewItem( item.ID );

                // Add the title to it.
                lvItem.SubItems.Add( item.Title );

                // Add the item to the list.
                lvArt.Items.Add( lvItem );

                // We've changed the list. Become dirty.
                bDirty = true;
            }
        }
Beispiel #3
0
 /// <summary>
 /// Format an item for writing to a file.
 /// </summary>
 /// <param name="item">The item to be formatted.</param>
 /// <returns>A string representation of the item.</returns>
 protected abstract string FormatItem( RBArtItem item );