Пример #1
0
        private void populateNodeDetails()
        {
            tvPackageDetails.Nodes.Clear();
            tvModelDetails.Nodes.Clear();

            if (TV.SelectedNode != null)
            {
                Package package = null;
                Model   model   = null;

                if (TV.SelectedNode.Tag is Package)
                {
                    package = TV.SelectedNode.Tag as Package;
                }
                if (TV.SelectedNode.Tag is Model)
                {
                    model   = TV.SelectedNode.Tag as Model;
                    package = metaDataStore.GetPackageForModel(model);
                }

                if (package != null)
                {
                    populatePackageDetail(package);
                }
                if (model != null)
                {
                    populateModelDetail(model);
                }
            }
        }