private void buttonOpenAsset_Click(object sender, EventArgs e)
 {
     IAsset AssetToDisplayP = MyProgram.Asset;
     if (AssetToDisplayP != null)
     {
         AssetInformation form = new AssetInformation(MyMainForm, MyContext, MyDynManifestContext)
         {
             myAsset = AssetToDisplayP,
             myStreamingEndpoints = MyStreamingEndpoints // we want to keep the same sorting
         };
         DialogResult dialogResult = form.ShowDialog(this);
     }
 }
        public DialogResult? DisplayInfo(IAsset asset)
        {
            DialogResult? dialogResult = null;
            if (asset != null)
            {
                // Refresh the asset.
                _context = Program.ConnectAndGetNewContext(_credentials);
                asset = _context.Assets.Where(a => a.Id == asset.Id).FirstOrDefault();
                if (asset != null)
                {
                    try
                    {
                        this.Cursor = Cursors.WaitCursor;
                        AssetInformation form = new AssetInformation(this, _context)
                        {
                            myAsset = asset,
                            myStreamingEndpoints = dataGridViewStreamingEndpointsV.DisplayedStreamingEndpoints // we want to keep the same sorting
                        };

                        dialogResult = form.ShowDialog(this);

                    }
                    finally
                    {
                        this.Cursor = Cursors.Arrow;
                        dataGridViewAssetsV.PurgeCacheAsset(asset);
                        dataGridViewAssetsV.AnalyzeItemsInBackground();
                    }
                }
            }
            return dialogResult;
        }