/// <summary> /// Open the properties window on the asset selected /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void ListListView_DoubleClick(object sender, System.EventArgs e) { Control sourceControl = sender as Control; ArrayList assetNames = new ArrayList(); foreach (ListViewItem item in ListListView.SelectedItems) { // Find the 'Fullname' column index int columnIndex = FindColumn("Fullname"); if (columnIndex == -1) { // Do it the old way that could crash columnIndex = (int)ASSET_LIST.FULLNAME; // Make sure we don't exceed our sub items if (columnIndex >= item.SubItems.Count) { columnIndex = -1; } } // Check if we found a valid columnIndex? if (columnIndex != -1) { assetNames.Add(item.SubItems[columnIndex].Text); } } AssetPropertiesForm properties = new AssetPropertiesForm(); properties.Initialize(assetNames); properties.ShowDialog(sourceControl.TopLevelControl); }
public void AssetProperties() { TabPage tab = mAssetManager.mainForm.AssetManagerInboxTabControl.SelectedTab; if (tab != null) { ListView view = tab.Controls[0] as ListView; if (view != null) { if (view.SelectedItems.Count != 0) { foreach (ListViewItem item in view.SelectedItems) { AssetPropertiesForm properties = new AssetPropertiesForm(); properties.Initialize(item.SubItems[(int)guiAssetManager.AssetBoxColumns.FULLNAME].Text); properties.Show(mAssetManager.mainForm); } } } } }