private void trvPlugins_SelectionChanged(object sender, CrmTreeNodeTreeEventArgs e) { if ((m_currentImage == null && e.Node.NodeType == CrmTreeNodeType.Step) || (m_currentImage != null && e.Node.NodeType == CrmTreeNodeType.Image)) { CrmPluginStep step; switch (e.Node.NodeType) { case CrmTreeNodeType.Step: step = (CrmPluginStep)e.Node; break; case CrmTreeNodeType.Image: step = m_org.Steps[((CrmPluginImage)e.Node).StepId]; break; default: throw new NotImplementedException("NodeType = " + e.Node.NodeType.ToString()); } if (step.MessageEntityId != Guid.Empty) { crmParameters.EntityName = m_org.Messages[step.MessageId][step.MessageEntityId].PrimaryEntity; } else { crmParameters.EntityName = "none"; crmParameters.Enabled = false; } btnRegister.Enabled = true; } else { crmParameters.Attributes = null; btnRegister.Enabled = false; } }
private void trvPlugins_SelectionChanged(object sender, CrmTreeNodeTreeEventArgs e) { btnSelect.Enabled = (e.Node != null); }