Exemple #1
0
 void OnSelectcallback(NXOpen.BlockStyler.Tree tree, NXOpen.BlockStyler.Node node, int columnID, bool selected)
 {
     if (selected)
     {
         var selectedNode = GetSelectNode();
         if (selectedNode != null)
         {
             UFDisp(GetPointDatasFromTree(), GetNodes().IndexOf(selectedNode), false);
         }
     }
 }
Exemple #2
0
    void OnSelectcallback(NXOpen.BlockStyler.Tree tree, NXOpen.BlockStyler.Node node, int columnID, bool selected)
    {
        var index = int.Parse(node.DisplayText) - 1;

        coms.ForEach(u => {
            u.IsHighlighted = false;
        });
        if (coms.Count > index)
        {
            var com = coms[index];
            com.IsHighlighted = true;
        }
    }
Exemple #3
0
 void OnSelectcallback(NXOpen.BlockStyler.Tree tree, NXOpen.BlockStyler.Node node, int columnID, bool selected)
 {
     if (selected)
     {
         var selectedNode = GetSelectNode();
         if (selectedNode != null)
         {
             var datas = GetPointDatasFromTree();
             var index = GetNodes().IndexOf(selectedNode);
             UFDisp(datas, index, false);
             if (index >= 0 && datas.Count > index)
             {
                 //显示探针
                 SetProbeShow(datas.ElementAt(index), _config);
             }
         }
     }
 }
Exemple #4
0
 void OnSelectcallback(NXOpen.BlockStyler.Tree tree, NXOpen.BlockStyler.Node node, int columnID, bool selected)
 {
     if (selected)
     {
         var  data   = GetProbeData(node);
         bool isInit = false;
         strProbeName.Enable         = isInit;
         btnDelete.Enable            = !isInit;
         strProbeName.Value          = node.DisplayText;
         expSphereRadius.Value       = data.SphereRadius;
         expArrowRadius.Value        = data.ArrowRadius;
         expArrowLength.Value        = data.ArrowLength;
         expExtensionBarRadius.Value = data.ExtensionBarRadius;
         expExtensionBarLength.Value = data.ExtensionBarLength;
         expHeadRadius.Value         = data.HeadRadius;
         expHeadLength.Value         = data.HeadLength;
         strProbeAB.SetValue(new List <string>()
         {
             data.ProbeAB
         }.ToArray());
     }
 }