private void BrowseCTRL_NodeSelected(object sender, TreeNodeActionEventArgs e)
{
if (e.Node != null)
{
ReferenceDescription reference = e.Node as ReferenceDescription;
if (reference != null && reference.NodeClass == NodeClass.Variable)
{
CommandBTN.Visibility = Visibility.Visible;
CommandBTN.Content = "Report";
RemoveAllClickEventsFromButton();
CommandBTN.Click += ContextMenu_OnReport;
CommandBTN.Tag = e.Node;
}
else
{
RemoveAllClickEventsFromButton();
CommandBTN.Visibility = Visibility.Collapsed;
CommandBTN.Tag = null;
}
}
}