private void c_TreeView_AfterSelect(object sender, TreeViewEventArgs e) { if (e.Node.Tag is ICommunicationLayerId) { c_PropertyGrid.SelectedObject = ((ICommunicationLayerId)e.Node.Tag).GetCommunicationLayerDescription; GetSelectedDPID = (IDataProviderID)e.Node.Parent.Tag; GetSelectedDPID.SelectedCommunicationLayer = (ICommunicationLayerId)e.Node.Tag; m_OKCnacelForm.CanBeAccepted(true); } else { if (e.Node.Tag is IDataProviderID) { c_PropertyGrid.SelectedObject = ((IDataProviderID)e.Node.Tag).GetDataProviderDescription; } GetSelectedDPID = null; m_OKCnacelForm.CanBeAccepted(false); } }
private void m_listBox_SelectedIndexChanged(object sender, EventArgs e) { m_Parent.CanBeAccepted(m_listBox.SelectedItem != null); }