private void ShowFileMetadata()
        {
            var SelectedAssetFile = ReturnSelectedAssetFiles().FirstOrDefault();

            if (SelectedAssetFile != null)
            {
                ILocator locator = GetTemporaryLocator();

                if (locator != null)
                {
                    AssetFileMetadata manifestAssetFile = null;
                    try
                    {
                        // Get the metadata for the asset file.
                        manifestAssetFile = SelectedAssetFile.GetMetadata(locator);
                    }
                    catch (Exception ex)
                    {
                        MessageBox.Show("Error when accessing metadata." + ex.Message);
                    }

                    if (manifestAssetFile != null)
                    {
                        MetadataInformation form = new MetadataInformation(manifestAssetFile);
                        form.ShowDialog();
                    }
                    else
                    {
                        MessageBox.Show("There is no metadata for this file.");
                    }
                }
            }
        }
        private void ShowFileMetadata()
        {
            if (listViewFiles.SelectedItems.Count > 0)
            {
                if (listViewFiles.SelectedItems[0] != null)
                {
                    IAssetFile AF = null;
                    ILocator locator = GetTemporaryLocator();

                    if (locator != null)
                    {
                        AssetFileMetadata manifestAssetFile = null;
                        try
                        {
                            AF = myAsset.AssetFiles.Skip(listViewFiles.SelectedIndices[0]).Take(1).FirstOrDefault();
                            // Get the metadata for the asset file.
                            manifestAssetFile = AF.GetMetadata(locator);
                        }
                        catch (Exception ex)
                        {
                            MessageBox.Show("Error when accessing metadata." + ex.Message);
                        }

                        if (manifestAssetFile != null)
                        {
                            MetadataInformation form = new MetadataInformation(manifestAssetFile);
                            form.ShowDialog();
                        }
                        else
                        {
                            MessageBox.Show("There is no metadata for this file.");
                        }
                    }
                }
            }
        }