Ejemplo n.º 1
0
    //------------------------------------------------------------------------------
    //---------------------Block UI Styler Callback Functions--------------------------
    //------------------------------------------------------------------------------

    //------------------------------------------------------------------------------
    //Callback Name: initialize_cb
    //------------------------------------------------------------------------------
    public void initialize_cb()
    {
        try
        {
            group0                = (NXOpen.BlockStyler.Group)theDialog.TopBlock.FindBlock("group0");
            tree_control0         = (NXOpen.BlockStyler.Tree)theDialog.TopBlock.FindBlock("tree_control0");
            btnNew                = (NXOpen.BlockStyler.Button)theDialog.TopBlock.FindBlock("btnNew");
            btnSave               = (NXOpen.BlockStyler.Button)theDialog.TopBlock.FindBlock("btnSave");
            btnDelete             = (NXOpen.BlockStyler.Button)theDialog.TopBlock.FindBlock("btnDelete");
            group                 = (NXOpen.BlockStyler.Group)theDialog.TopBlock.FindBlock("group");
            drawingArea0          = (NXOpen.BlockStyler.DrawingArea)theDialog.TopBlock.FindBlock("drawingArea0");
            strProbeName          = (NXOpen.BlockStyler.StringBlock)theDialog.TopBlock.FindBlock("strProbeName");
            strProbeAB            = (NXOpen.BlockStyler.MultilineString)theDialog.TopBlock.FindBlock("strProbeAB");
            expSphereRadius       = (NXOpen.BlockStyler.ExpressionBlock)theDialog.TopBlock.FindBlock("expSphereRadius");
            expArrowRadius        = (NXOpen.BlockStyler.ExpressionBlock)theDialog.TopBlock.FindBlock("expArrowRadius");
            expArrowLength        = (NXOpen.BlockStyler.ExpressionBlock)theDialog.TopBlock.FindBlock("expArrowLength");
            expExtensionBarRadius = (NXOpen.BlockStyler.ExpressionBlock)theDialog.TopBlock.FindBlock("expExtensionBarRadius");
            expExtensionBarLength = (NXOpen.BlockStyler.ExpressionBlock)theDialog.TopBlock.FindBlock("expExtensionBarLength");
            expHeadRadius         = (NXOpen.BlockStyler.ExpressionBlock)theDialog.TopBlock.FindBlock("expHeadRadius");
            expHeadLength         = (NXOpen.BlockStyler.ExpressionBlock)theDialog.TopBlock.FindBlock("expHeadLength");
            //------------------------------------------------------------------------------
            //Registration of Treelist specific callbacks
            //------------------------------------------------------------------------------
            //tree_control0.SetOnExpandHandler(new NXOpen.BlockStyler.Tree.OnExpandCallback(OnExpandCallback));

            //tree_control0.SetOnInsertColumnHandler(new NXOpen.BlockStyler.Tree.OnInsertColumnCallback(OnInsertColumnCallback));

            //tree_control0.SetOnInsertNodeHandler(new NXOpen.BlockStyler.Tree.OnInsertNodeCallback(OnInsertNodecallback));

            //tree_control0.SetOnDeleteNodeHandler(new NXOpen.BlockStyler.Tree.OnDeleteNodeCallback(OnDeleteNodecallback));

            //tree_control0.SetOnPreSelectHandler(new NXOpen.BlockStyler.Tree.OnPreSelectCallback(OnPreSelectcallback));

            //tree_control0.SetOnSelectHandler(new NXOpen.BlockStyler.Tree.OnSelectCallback(OnSelectcallback));

            //tree_control0.SetOnStateChangeHandler(new NXOpen.BlockStyler.Tree.OnStateChangeCallback(OnStateChangecallback));

            //tree_control0.SetToolTipTextHandler(new NXOpen.BlockStyler.Tree.ToolTipTextCallback(ToolTipTextcallback));

            //tree_control0.SetColumnSortHandler(new NXOpen.BlockStyler.Tree.ColumnSortCallback(ColumnSortcallback));

            //tree_control0.SetStateIconNameHandler(new NXOpen.BlockStyler.Tree.StateIconNameCallback(StateIconNameCallback));

            //tree_control0.SetOnBeginLabelEditHandler(new NXOpen.BlockStyler.Tree.OnBeginLabelEditCallback(OnBeginLabelEditCallback));

            //tree_control0.SetOnEndLabelEditHandler(new NXOpen.BlockStyler.Tree.OnEndLabelEditCallback(OnEndLabelEditCallback));

            //tree_control0.SetOnEditOptionSelectedHandler(new NXOpen.BlockStyler.Tree.OnEditOptionSelectedCallback(OnEditOptionSelectedCallback));

            //tree_control0.SetAskEditControlHandler(new NXOpen.BlockStyler.Tree.AskEditControlCallback(AskEditControlCallback));

            //tree_control0.SetOnMenuHandler(new NXOpen.BlockStyler.Tree.OnMenuCallback(OnMenuCallback));;

            //tree_control0.SetOnMenuSelectionHandler(new NXOpen.BlockStyler.Tree.OnMenuSelectionCallback(OnMenuSelectionCallback));;

            //tree_control0.SetIsDropAllowedHandler(new NXOpen.BlockStyler.Tree.IsDropAllowedCallback(IsDropAllowedCallback));;

            //tree_control0.SetIsDragAllowedHandler(new NXOpen.BlockStyler.Tree.IsDragAllowedCallback(IsDragAllowedCallback));;

            //tree_control0.SetOnDropHandler(new NXOpen.BlockStyler.Tree.OnDropCallback(OnDropCallback));;

            //tree_control0.SetOnDropMenuHandler(new NXOpen.BlockStyler.Tree.OnDropMenuCallback(OnDropMenuCallback));

            //tree_control0.SetOnDefaultActionHandler(new NXOpen.BlockStyler.Tree.OnDefaultActionCallback(OnDefaultActionCallback));

            //------------------------------------------------------------------------------
        }
        catch (Exception ex)
        {
            //---- Enter your exception handling code here -----
            theUI.NXMessageBox.Show("Block Styler", NXMessageBox.DialogType.Error, ex.ToString());
        }
    }
Ejemplo n.º 2
0
        //------------------------------------------------------------------------------
        //---------------------Block UI Styler Callback Functions--------------------------
        //------------------------------------------------------------------------------

        //------------------------------------------------------------------------------
        //Callback Name: initialize_cb
        //------------------------------------------------------------------------------
        public void initialize_cb()
        {
            try
            {
                group           = (NXOpen.BlockStyler.Group)theDialog.TopBlock.FindBlock("group");
                scrolledWindow  = (NXOpen.BlockStyler.ScrolledWindow)theDialog.TopBlock.FindBlock("scrolledWindow");
                strType1        = (NXOpen.BlockStyler.StringBlock)theDialog.TopBlock.FindBlock("strType1");
                png             = (NXOpen.BlockStyler.DrawingArea)theDialog.TopBlock.FindBlock("png");
                scrolledWindow1 = (NXOpen.BlockStyler.ScrolledWindow)theDialog.TopBlock.FindBlock("scrolledWindow1");
                bodySelectA     = (NXOpen.BlockStyler.BodyCollector)theDialog.TopBlock.FindBlock("bodySelectA");
                label0          = (NXOpen.BlockStyler.Label)theDialog.TopBlock.FindBlock("label0");
                bodySelectB     = (NXOpen.BlockStyler.BodyCollector)theDialog.TopBlock.FindBlock("bodySelectB");
                label01         = (NXOpen.BlockStyler.Label)theDialog.TopBlock.FindBlock("label01");
                buttonOk        = (NXOpen.BlockStyler.Button)theDialog.TopBlock.FindBlock("buttonOk");
                group3          = (NXOpen.BlockStyler.Group)theDialog.TopBlock.FindBlock("group3");
                stringName      = (NXOpen.BlockStyler.StringBlock)theDialog.TopBlock.FindBlock("stringName");
                seleBody        = (NXOpen.BlockStyler.BodyCollector)theDialog.TopBlock.FindBlock("seleBody");
                buttonOk1       = (NXOpen.BlockStyler.Button)theDialog.TopBlock.FindBlock("buttonOk1");
                group1          = (NXOpen.BlockStyler.Group)theDialog.TopBlock.FindBlock("group1");
                treeInfo        = (NXOpen.BlockStyler.Tree)theDialog.TopBlock.FindBlock("treeInfo");
                group2          = (NXOpen.BlockStyler.Group)theDialog.TopBlock.FindBlock("group2");
                strType         = (NXOpen.BlockStyler.StringBlock)theDialog.TopBlock.FindBlock("strType");
                mulMessage      = (NXOpen.BlockStyler.MultilineString)theDialog.TopBlock.FindBlock("mulMessage");
                //------------------------------------------------------------------------------
                //Registration of Treelist specific callbacks
                //------------------------------------------------------------------------------
                //treeInfo.SetOnExpandHandler(new NXOpen.BlockStyler.Tree.OnExpandCallback(OnExpandCallback));

                //treeInfo.SetOnInsertColumnHandler(new NXOpen.BlockStyler.Tree.OnInsertColumnCallback(OnInsertColumnCallback));

                //treeInfo.SetOnInsertNodeHandler(new NXOpen.BlockStyler.Tree.OnInsertNodeCallback(OnInsertNodecallback));

                //treeInfo.SetOnDeleteNodeHandler(new NXOpen.BlockStyler.Tree.OnDeleteNodeCallback(OnDeleteNodecallback));

                //treeInfo.SetOnPreSelectHandler(new NXOpen.BlockStyler.Tree.OnPreSelectCallback(OnPreSelectcallback));

                treeInfo.SetOnSelectHandler(new NXOpen.BlockStyler.Tree.OnSelectCallback(OnSelectcallback));

                //treeInfo.SetOnStateChangeHandler(new NXOpen.BlockStyler.Tree.OnStateChangeCallback(OnStateChangecallback));

                //treeInfo.SetToolTipTextHandler(new NXOpen.BlockStyler.Tree.ToolTipTextCallback(ToolTipTextcallback));

                //treeInfo.SetColumnSortHandler(new NXOpen.BlockStyler.Tree.ColumnSortCallback(ColumnSortcallback));

                //treeInfo.SetStateIconNameHandler(new NXOpen.BlockStyler.Tree.StateIconNameCallback(StateIconNameCallback));

                treeInfo.SetOnBeginLabelEditHandler(new NXOpen.BlockStyler.Tree.OnBeginLabelEditCallback(OnBeginLabelEditCallback));

                treeInfo.SetOnEndLabelEditHandler(new NXOpen.BlockStyler.Tree.OnEndLabelEditCallback(OnEndLabelEditCallback));

                treeInfo.SetOnEditOptionSelectedHandler(new NXOpen.BlockStyler.Tree.OnEditOptionSelectedCallback(OnEditOptionSelectedCallback));

                treeInfo.SetAskEditControlHandler(new NXOpen.BlockStyler.Tree.AskEditControlCallback(AskEditControlCallback));

                treeInfo.SetOnMenuHandler(new NXOpen.BlockStyler.Tree.OnMenuCallback(OnMenuCallback));;

                treeInfo.SetOnMenuSelectionHandler(new NXOpen.BlockStyler.Tree.OnMenuSelectionCallback(OnMenuSelectionCallback));;

                //treeInfo.SetIsDropAllowedHandler(new NXOpen.BlockStyler.Tree.IsDropAllowedCallback(IsDropAllowedCallback));;

                //treeInfo.SetIsDragAllowedHandler(new NXOpen.BlockStyler.Tree.IsDragAllowedCallback(IsDragAllowedCallback));;

                //treeInfo.SetOnDropHandler(new NXOpen.BlockStyler.Tree.OnDropCallback(OnDropCallback));;

                //treeInfo.SetOnDropMenuHandler(new NXOpen.BlockStyler.Tree.OnDropMenuCallback(OnDropMenuCallback));

                //treeInfo.SetOnDefaultActionHandler(new NXOpen.BlockStyler.Tree.OnDefaultActionCallback(OnDefaultActionCallback));

                //------------------------------------------------------------------------------
            }
            catch (Exception ex)
            {
                //---- Enter your exception handling code here -----
                theUI.NXMessageBox.Show("Block Styler", NXMessageBox.DialogType.Error, ex.ToString());
            }
        }
Ejemplo n.º 3
0
    //------------------------------------------------------------------------------
    //---------------------Block UI Styler Callback Functions--------------------------
    //------------------------------------------------------------------------------

    //------------------------------------------------------------------------------
    //Callback Name: initialize_cb
    //------------------------------------------------------------------------------
    public void initialize_cb()
    {
        try
        {
            group0             = (NXOpen.BlockStyler.Group)theDialog.TopBlock.FindBlock("group0");
            selectCuprum       = (NXOpen.BlockStyler.SelectObject)theDialog.TopBlock.FindBlock("selectCuprum");
            enumSelectTool     = (NXOpen.BlockStyler.Enumeration)theDialog.TopBlock.FindBlock("enumSelectTool");
            group              = (NXOpen.BlockStyler.Group)theDialog.TopBlock.FindBlock("group");
            drawingArea0       = (NXOpen.BlockStyler.DrawingArea)theDialog.TopBlock.FindBlock("drawingArea0");
            toggle0            = (NXOpen.BlockStyler.Toggle)theDialog.TopBlock.FindBlock("toggle0");
            btnAutoSelectPoint = (NXOpen.BlockStyler.Button)theDialog.TopBlock.FindBlock("btnAutoSelectPoint");
            selectionPoint     = (NXOpen.BlockStyler.SelectObject)theDialog.TopBlock.FindBlock("selectionPoint");
            tree_control0      = (NXOpen.BlockStyler.Tree)theDialog.TopBlock.FindBlock("tree_control0");
            btnUP              = (NXOpen.BlockStyler.Button)theDialog.TopBlock.FindBlock("btnUP");
            btnDown            = (NXOpen.BlockStyler.Button)theDialog.TopBlock.FindBlock("btnDown");
            btnRemove          = (NXOpen.BlockStyler.Button)theDialog.TopBlock.FindBlock("btnRemove");
            btnExport          = (NXOpen.BlockStyler.Button)theDialog.TopBlock.FindBlock("btnExport");
            //------------------------------------------------------------------------------
            //Registration of Treelist specific callbacks
            //------------------------------------------------------------------------------
            //tree_control0.SetOnExpandHandler(new NXOpen.BlockStyler.Tree.OnExpandCallback(OnExpandCallback));

            //tree_control0.SetOnInsertColumnHandler(new NXOpen.BlockStyler.Tree.OnInsertColumnCallback(OnInsertColumnCallback));

            //tree_control0.SetOnInsertNodeHandler(new NXOpen.BlockStyler.Tree.OnInsertNodeCallback(OnInsertNodecallback));

            //tree_control0.SetOnDeleteNodeHandler(new NXOpen.BlockStyler.Tree.OnDeleteNodeCallback(OnDeleteNodecallback));

            //tree_control0.SetOnPreSelectHandler(new NXOpen.BlockStyler.Tree.OnPreSelectCallback(OnPreSelectcallback));

            //tree_control0.SetOnSelectHandler(new NXOpen.BlockStyler.Tree.OnSelectCallback(OnSelectcallback));

            //tree_control0.SetOnStateChangeHandler(new NXOpen.BlockStyler.Tree.OnStateChangeCallback(OnStateChangecallback));

            //tree_control0.SetToolTipTextHandler(new NXOpen.BlockStyler.Tree.ToolTipTextCallback(ToolTipTextcallback));

            //tree_control0.SetColumnSortHandler(new NXOpen.BlockStyler.Tree.ColumnSortCallback(ColumnSortcallback));

            //tree_control0.SetStateIconNameHandler(new NXOpen.BlockStyler.Tree.StateIconNameCallback(StateIconNameCallback));

            //tree_control0.SetOnBeginLabelEditHandler(new NXOpen.BlockStyler.Tree.OnBeginLabelEditCallback(OnBeginLabelEditCallback));

            //tree_control0.SetOnEndLabelEditHandler(new NXOpen.BlockStyler.Tree.OnEndLabelEditCallback(OnEndLabelEditCallback));

            //tree_control0.SetOnEditOptionSelectedHandler(new NXOpen.BlockStyler.Tree.OnEditOptionSelectedCallback(OnEditOptionSelectedCallback));

            //tree_control0.SetAskEditControlHandler(new NXOpen.BlockStyler.Tree.AskEditControlCallback(AskEditControlCallback));

            //tree_control0.SetOnMenuHandler(new NXOpen.BlockStyler.Tree.OnMenuCallback(OnMenuCallback));;

            //tree_control0.SetOnMenuSelectionHandler(new NXOpen.BlockStyler.Tree.OnMenuSelectionCallback(OnMenuSelectionCallback));;

            //tree_control0.SetIsDropAllowedHandler(new NXOpen.BlockStyler.Tree.IsDropAllowedCallback(IsDropAllowedCallback));;

            //tree_control0.SetIsDragAllowedHandler(new NXOpen.BlockStyler.Tree.IsDragAllowedCallback(IsDragAllowedCallback));;

            //tree_control0.SetOnDropHandler(new NXOpen.BlockStyler.Tree.OnDropCallback(OnDropCallback));;

            //tree_control0.SetOnDropMenuHandler(new NXOpen.BlockStyler.Tree.OnDropMenuCallback(OnDropMenuCallback));

            //tree_control0.SetOnDefaultActionHandler(new NXOpen.BlockStyler.Tree.OnDefaultActionCallback(OnDefaultActionCallback));

            //------------------------------------------------------------------------------
        }
        catch (Exception ex)
        {
            //---- Enter your exception handling code here -----
            theUI.NXMessageBox.Show("Block Styler", NXMessageBox.DialogType.Error, ex.ToString());
        }
    }