private void menuItem_AddToPreviousCollection_Click(object sender, EventArgs e) { ListViewItem lvi = listview_Textures.SelectedItems[0]; System.Diagnostics.Debug.Assert(lvi != null); Editor.TextureCollection collection = GetTextureCollection(m_collection_added_to); collection.AddTexture(lvi.Text); }
private void menuItem_AddToCollection_Click(object sender, EventArgs e) { if (listview_Textures.SelectedItems.Count > 0) { ListViewItem lvi = listview_Textures.SelectedItems[0]; System.Diagnostics.Debug.Assert(lvi != null); Editor.TextureCollection collection = editor.TextureCollections.Find(c => EscapeAmpersands(c.Name) == ((MenuItem)sender).Text); collection.AddTexture(lvi.Text); m_collection_added_to = collection.Name; } }