コード例 #1
0
        private void btnRemove_Click(object sender, System.EventArgs e)
        {
            DependencyProduct         product               = this.lbSelected.SelectedItem as DependencyProduct;
            ProductTreeNode           productNode           = this.tvProducts.Nodes[product.Name] as ProductTreeNode;
            DependencyProductTreeNode dependencyProductNode = productNode.Nodes[product.ToString()] as DependencyProductTreeNode;

            this.tvProducts.SelectedNode  = dependencyProductNode;
            dependencyProductNode.Checked = false;
        }
コード例 #2
0
        private void LoadProductVersions(ProductTreeNode productNode)
        {
            List <Version> versions       = this.LoadVersions(productNode.Product);
            List <Version> sortedVersions = this.SortVersions(versions);

            foreach (Version version in sortedVersions)
            {
                DependencyProduct         dependencyProduct = this.LoadDependencyProduct(productNode.Product.Name, version);
                DependencyProductTreeNode node = new DependencyProductTreeNode(dependencyProduct);

                node.Checked = this.BetaData.DependencyProducts.Contains(productNode.Product.Name, version.VersionNumber);

                productNode.Nodes.Add(node);
            }

            productNode.ExpandAll();

            this.UpdateSelectedVersions();
        }
コード例 #3
0
        private void tvProducts_AfterCheck(object sender, TreeViewEventArgs e)
        {
            if (this.tvProducts.SelectedNode is DependencyProductTreeNode)
            {
                DependencyProductTreeNode node = this.tvProducts.SelectedNode as DependencyProductTreeNode;
                DependencyProduct         dependencyProduct = node.Product;

                if (!this.tvProducts.SelectedNode.Checked)
                {
                    this.BetaData.DependencyProducts.Remove(dependencyProduct);
                }
                else
                {
                    this.BetaData.DependencyProducts.Add(dependencyProduct);
                }
            }

            this.UpdateSelectedVersions();
            this.UpdateControls();
        }