示例#1
0
 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);
     }
 }
示例#2
0
文件: AddNode.cs 项目: mpostol/ASMD
 private void m_listBox_SelectedIndexChanged(object sender, EventArgs e)
 {
     m_Parent.CanBeAccepted(m_listBox.SelectedItem != null);
 }