private void CreateNode(StoreName name, StoreLocation location) { TreeNode tn = null; CertificateStoreChooserValue cscv = new CertificateStoreChooserValue(name, location); if (cscv.CertificateCount > 0) { tn = new TreeNode(cscv.NameWithCount); tn.Tag = cscv; } if (tn == null) { return; } if (location == StoreLocation.CurrentUser) { tnCurrentUser.Nodes.Add(tn); } else { tnLocalMachine.Nodes.Add(tn); } }
private void tvStores_AfterSelect(object sender, TreeViewEventArgs e) { value = e.Node.Tag as CertificateStoreChooserValue; }