Exemple #1
0
    //------------------------------------------------------------------------------
    //---------------------Block UI Styler Callback Functions--------------------------
    //------------------------------------------------------------------------------

    //------------------------------------------------------------------------------
    //Callback Name: initialize_cb
    //------------------------------------------------------------------------------
    public void initialize_cb()
    {
        try
        {
            group1      = (NXOpen.BlockStyler.Group)theDialog.TopBlock.FindBlock("group1");
            selectSteel = (NXOpen.BlockStyler.SelectObject)theDialog.TopBlock.FindBlock("selectSteel");
            toggleIsDistinguishSideElec = (NXOpen.BlockStyler.Toggle)theDialog.TopBlock.FindBlock("toggleIsDistinguishSideElec");
            toggleSInsert         = (NXOpen.BlockStyler.Toggle)theDialog.TopBlock.FindBlock("toggleSInsert");
            enumSInsert           = (NXOpen.BlockStyler.Enumeration)theDialog.TopBlock.FindBlock("enumSInsert");
            selectionSInsert      = (NXOpen.BlockStyler.SelectObject)theDialog.TopBlock.FindBlock("selectionSInsert");
            integerSInsertLayer   = (NXOpen.BlockStyler.IntegerBlock)theDialog.TopBlock.FindBlock("integerSInsertLayer");
            groupElec             = (NXOpen.BlockStyler.Group)theDialog.TopBlock.FindBlock("groupElec");
            selectElec            = (NXOpen.BlockStyler.SelectObject)theDialog.TopBlock.FindBlock("selectElec");
            groupElecLayer        = (NXOpen.BlockStyler.Group)theDialog.TopBlock.FindBlock("groupElecLayer");
            integerElecStartLayer = (NXOpen.BlockStyler.IntegerBlock)theDialog.TopBlock.FindBlock("integerElecStartLayer");
            integerElecEndLayer   = (NXOpen.BlockStyler.IntegerBlock)theDialog.TopBlock.FindBlock("integerElecEndLayer");
            group          = (NXOpen.BlockStyler.Group)theDialog.TopBlock.FindBlock("group");
            sMODELNUMBER   = (NXOpen.BlockStyler.StringBlock)theDialog.TopBlock.FindBlock("sMODELNUMBER");
            sMRNUMBER      = (NXOpen.BlockStyler.StringBlock)theDialog.TopBlock.FindBlock("sMRNUMBER");
            eMATERAL       = (NXOpen.BlockStyler.Enumeration)theDialog.TopBlock.FindBlock("eMATERAL");
            group2         = (NXOpen.BlockStyler.Group)theDialog.TopBlock.FindBlock("group2");
            enum0          = (NXOpen.BlockStyler.Enumeration)theDialog.TopBlock.FindBlock("enum0");
            coord_system0  = (NXOpen.BlockStyler.SpecifyCSYS)theDialog.TopBlock.FindBlock("coord_system0");
            group21        = (NXOpen.BlockStyler.Group)theDialog.TopBlock.FindBlock("group21");
            enumSelectedXX = (NXOpen.BlockStyler.Enumeration)theDialog.TopBlock.FindBlock("enumSelectedXX");
        }
        catch (Exception ex)
        {
            //---- Enter your exception handling code here -----
            theUI.NXMessageBox.Show("Block Styler", NXMessageBox.DialogType.Error, ex.ToString());
        }
    }
Exemple #2
0
        //------------------------------------------------------------------------------
        //---------------------Block UI Styler Callback Functions--------------------------
        //------------------------------------------------------------------------------

        //------------------------------------------------------------------------------
        //Callback Name: initialize_cb
        //------------------------------------------------------------------------------
        public void initialize_cb()
        {
            try
            {
                group         = (NXOpen.BlockStyler.Group)theDialog.TopBlock.FindBlock("group");
                seleComp      = (NXOpen.BlockStyler.SelectObject)theDialog.TopBlock.FindBlock("seleComp");
                group0        = (NXOpen.BlockStyler.Group)theDialog.TopBlock.FindBlock("group0");
                MoldNumber    = (NXOpen.BlockStyler.StringBlock)theDialog.TopBlock.FindBlock("MoldNumber");
                PartNumber    = (NXOpen.BlockStyler.StringBlock)theDialog.TopBlock.FindBlock("PartNumber");
                EditionNumber = (NXOpen.BlockStyler.StringBlock)theDialog.TopBlock.FindBlock("EditionNumber");
                ClientNumber  = (NXOpen.BlockStyler.StringBlock)theDialog.TopBlock.FindBlock("ClientNumber");
                enum0         = (NXOpen.BlockStyler.Enumeration)theDialog.TopBlock.FindBlock("enum0");

                Selection.MaskTriple maskComp = new Selection.MaskTriple()
                {
                    Type             = 63,
                    Subtype          = 1,
                    SolidBodySubtype = 0
                };
                Selection.MaskTriple[] masks = { maskComp };
                seleComp.SetSelectionFilter(Selection.SelectionAction.ClearAndEnableSpecific, masks);//过滤只选择组件
            }
            catch (Exception ex)
            {
                //---- Enter your exception handling code here -----
                theUI.NXMessageBox.Show("Block Styler", NXMessageBox.DialogType.Error, ex.ToString());
            }
        }
        //------------------------------------------------------------------------------
        //---------------------Block UI Styler Callback Functions--------------------------
        //------------------------------------------------------------------------------

        //------------------------------------------------------------------------------
        //Callback Name: initialize_cb
        //------------------------------------------------------------------------------
        public void initialize_cb()
        {
            try
            {
                group0              = (NXOpen.BlockStyler.Group)theDialog.TopBlock.FindBlock("group0");
                seleComp            = (NXOpen.BlockStyler.SelectObject)theDialog.TopBlock.FindBlock("seleComp");
                groupWorkpiece      = (NXOpen.BlockStyler.Group)theDialog.TopBlock.FindBlock("groupWorkpiece");
                strMoldNumber       = (NXOpen.BlockStyler.StringBlock)theDialog.TopBlock.FindBlock("strMoldNumber");
                strWorkpieceNumber  = (NXOpen.BlockStyler.StringBlock)theDialog.TopBlock.FindBlock("strWorkpieceNumber");
                strEditionNumber    = (NXOpen.BlockStyler.StringBlock)theDialog.TopBlock.FindBlock("strEditionNumber");
                groupEle            = (NXOpen.BlockStyler.Group)theDialog.TopBlock.FindBlock("groupEle");
                strEleName          = (NXOpen.BlockStyler.StringBlock)theDialog.TopBlock.FindBlock("strEleName");
                strEleName1         = (NXOpen.BlockStyler.StringBlock)theDialog.TopBlock.FindBlock("strEleName1");
                strEleEditionNumber = (NXOpen.BlockStyler.StringBlock)theDialog.TopBlock.FindBlock("strEleEditionNumber");
                groupWork           = (NXOpen.BlockStyler.Group)theDialog.TopBlock.FindBlock("groupWork");
                intWorkNumber       = (NXOpen.BlockStyler.IntegerBlock)theDialog.TopBlock.FindBlock("intWorkNumber");
                Selection.MaskTriple maskComp = new Selection.MaskTriple()
                {
                    Type             = 63,
                    Subtype          = 1,
                    SolidBodySubtype = 0
                };
                Selection.MaskTriple[] masks = { maskComp };
                seleComp.SetSelectionFilter(Selection.SelectionAction.ClearAndEnableSpecific, masks);//过滤只选择组件
            }
            catch (Exception ex)
            {
                //---- Enter your exception handling code here -----
                theUI.NXMessageBox.Show("Block Styler", NXMessageBox.DialogType.Error, ex.ToString());
            }
        }
Exemple #4
0
 //------------------------------------------------------------------------------
 //Callback Name: initialize_cb
 //------------------------------------------------------------------------------
 public void initialize_cb()
 {
     try
     {
         group0      = (NXOpen.BlockStyler.Group)theDialog.TopBlock.FindBlock("group0");
         SeleElePart = (NXOpen.BlockStyler.SelectObject)theDialog.TopBlock.FindBlock("SeleElePart");
         StrName     = (NXOpen.BlockStyler.StringBlock)theDialog.TopBlock.FindBlock("StrName");
         group       = (NXOpen.BlockStyler.Group)theDialog.TopBlock.FindBlock("group");
         double_x    = (NXOpen.BlockStyler.DoubleBlock)theDialog.TopBlock.FindBlock("double_x");
         double_y    = (NXOpen.BlockStyler.DoubleBlock)theDialog.TopBlock.FindBlock("double_y");
         double_z    = (NXOpen.BlockStyler.DoubleBlock)theDialog.TopBlock.FindBlock("double_z");
         Selection.MaskTriple maskComp = new Selection.MaskTriple()
         {
             Type             = 63,
             Subtype          = 1,
             SolidBodySubtype = 0
         };
         Selection.MaskTriple[] masks = { maskComp };
         SeleElePart.SetSelectionFilter(Selection.SelectionAction.ClearAndEnableSpecific, masks);//过滤只选择组件
     }
     catch (Exception ex)
     {
         //---- Enter your exception handling code here -----
         theUI.NXMessageBox.Show("Block Styler", NXMessageBox.DialogType.Error, ex.ToString());
     }
 }
    //------------------------------------------------------------------------------
    //---------------------Block UI Styler Callback Functions--------------------------
    //------------------------------------------------------------------------------

    //------------------------------------------------------------------------------
    //Callback Name: initialize_cb
    //------------------------------------------------------------------------------
    public void initialize_cb()
    {
        try
        {
            face_select0       = (NXOpen.BlockStyler.FaceCollector)theDialog.TopBlock.FindBlock("face_select0");
            group              = (NXOpen.BlockStyler.Group)theDialog.TopBlock.FindBlock("group");
            elecName           = (NXOpen.BlockStyler.StringBlock)theDialog.TopBlock.FindBlock("elecName");
            expressionQingGen  = (NXOpen.BlockStyler.ExpressionBlock)theDialog.TopBlock.FindBlock("expressionQingGen");
            expressionDistance = (NXOpen.BlockStyler.ExpressionBlock)theDialog.TopBlock.FindBlock("expressionDistance");
            expressionJizhutai = (NXOpen.BlockStyler.ExpressionBlock)theDialog.TopBlock.FindBlock("expressionJizhutai");
            expressionDaojiao  = (NXOpen.BlockStyler.ExpressionBlock)theDialog.TopBlock.FindBlock("expressionDaojiao");
            expressionDaoyuan  = (NXOpen.BlockStyler.ExpressionBlock)theDialog.TopBlock.FindBlock("expressionDaoyuan");
            toggleAutoInteger  = (NXOpen.BlockStyler.Toggle)theDialog.TopBlock.FindBlock("toggleAutoInteger");
            expressionX        = (NXOpen.BlockStyler.ExpressionBlock)theDialog.TopBlock.FindBlock("expressionX");
            expressionY        = (NXOpen.BlockStyler.ExpressionBlock)theDialog.TopBlock.FindBlock("expressionY");
            expressionZ        = (NXOpen.BlockStyler.ExpressionBlock)theDialog.TopBlock.FindBlock("expressionZ");
            group1             = (NXOpen.BlockStyler.Group)theDialog.TopBlock.FindBlock("group1");
            enum0              = (NXOpen.BlockStyler.Enumeration)theDialog.TopBlock.FindBlock("enum0");
        }
        catch (Exception ex)
        {
            //---- Enter your exception handling code here -----
            theUI.NXMessageBox.Show("Block Styler", NXMessageBox.DialogType.Error, ex.ToString());
        }
    }
Exemple #6
0
    //------------------------------------------------------------------------------
    //---------------------Block UI Styler Callback Functions--------------------------
    //------------------------------------------------------------------------------

    //------------------------------------------------------------------------------
    //Callback Name: initialize_cb
    //------------------------------------------------------------------------------
    public void initialize_cb()
    {
        try
        {
            bodySelect0          = (NXOpen.BlockStyler.BodyCollector)theDialog.TopBlock.FindBlock("bodySelect0");
            nativeFolderBrowser0 = (NXOpen.BlockStyler.FolderSelection)theDialog.TopBlock.FindBlock("nativeFolderBrowser0");
            string0 = (NXOpen.BlockStyler.StringBlock)theDialog.TopBlock.FindBlock("string0");
        }
        catch (Exception ex)
        {
            //---- Enter your exception handling code here -----
            theUI.NXMessageBox.Show("Block Styler", NXMessageBox.DialogType.Error, ex.ToString());
        }
    }
Exemple #7
0
        //------------------------------------------------------------------------------
        //---------------------Block UI Styler Callback Functions--------------------------
        //------------------------------------------------------------------------------

        //------------------------------------------------------------------------------
        //Callback Name: initialize_cb
        //------------------------------------------------------------------------------
        public void initialize_cb()
        {
            try
            {
                group0   = (NXOpen.BlockStyler.Group)theDialog.TopBlock.FindBlock("group0");
                string0  = (NXOpen.BlockStyler.StringBlock)theDialog.TopBlock.FindBlock("string0");
                string01 = (NXOpen.BlockStyler.StringBlock)theDialog.TopBlock.FindBlock("string01");
            }
            catch (Exception ex)
            {
                //---- Enter your exception handling code here -----
                theUI.NXMessageBox.Show("Block Styler", NXMessageBox.DialogType.Error, ex.ToString());
            }
        }
Exemple #8
0
        //------------------------------------------------------------------------------
        //---------------------Block UI Styler Callback Functions--------------------------
        //------------------------------------------------------------------------------

        //------------------------------------------------------------------------------
        //Callback Name: initialize_cb
        //------------------------------------------------------------------------------
        public void initialize_cb()
        {
            try
            {
                group0        = (NXOpen.BlockStyler.Group)theDialog.TopBlock.FindBlock("group0");
                MoldNumber    = (NXOpen.BlockStyler.StringBlock)theDialog.TopBlock.FindBlock("MoldNumber");
                PartNumber    = (NXOpen.BlockStyler.StringBlock)theDialog.TopBlock.FindBlock("PartNumber");
                EditionNumber = (NXOpen.BlockStyler.StringBlock)theDialog.TopBlock.FindBlock("EditionNumber");
                MoldType      = (NXOpen.BlockStyler.StringBlock)theDialog.TopBlock.FindBlock("MoldType");
                ClientNumber  = (NXOpen.BlockStyler.StringBlock)theDialog.TopBlock.FindBlock("ClientNumber");
            }
            catch (Exception ex)
            {
                //---- Enter your exception handling code here -----
                theUI.NXMessageBox.Show("Block Styler", NXMessageBox.DialogType.Error, ex.ToString());
            }
        }
Exemple #9
0
    //------------------------------------------------------------------------------
    //---------------------Block UI Styler Callback Functions--------------------------
    //------------------------------------------------------------------------------

    //------------------------------------------------------------------------------
    //Callback Name: initialize_cb
    //------------------------------------------------------------------------------
    public void initialize_cb()
    {
        try
        {
            group                 = (NXOpen.BlockStyler.Group)theDialog.TopBlock.FindBlock("group");
            selectCuprum          = (NXOpen.BlockStyler.SelectObject)theDialog.TopBlock.FindBlock("selectCuprum");
            strElecName           = (NXOpen.BlockStyler.StringBlock)theDialog.TopBlock.FindBlock("strElecName");
            strElecSize           = (NXOpen.BlockStyler.StringBlock)theDialog.TopBlock.FindBlock("strElecSize");
            strElecCuttingSize    = (NXOpen.BlockStyler.StringBlock)theDialog.TopBlock.FindBlock("strElecCuttingSize");
            groupSElec            = (NXOpen.BlockStyler.Group)theDialog.TopBlock.FindBlock("groupSElec");
            selectTopFace         = (NXOpen.BlockStyler.SelectObject)theDialog.TopBlock.FindBlock("selectTopFace");
            selectBaseFace        = (NXOpen.BlockStyler.SelectObject)theDialog.TopBlock.FindBlock("selectBaseFace");
            selectBaseFacePoint   = (NXOpen.BlockStyler.SelectObject)theDialog.TopBlock.FindBlock("selectBaseFacePoint");
            selectBaseFacePointEx = (NXOpen.BlockStyler.SpecifyPoint)theDialog.TopBlock.FindBlock("selectBaseFacePointEx");
            group1                = (NXOpen.BlockStyler.Group)theDialog.TopBlock.FindBlock("group1");
            scrolledWindow        = (NXOpen.BlockStyler.ScrolledWindow)theDialog.TopBlock.FindBlock("scrolledWindow");
            txtFINISHNUMBER       = (NXOpen.BlockStyler.IntegerBlock)theDialog.TopBlock.FindBlock("txtFINISHNUMBER");
            txtMIDDLENUMBER       = (NXOpen.BlockStyler.IntegerBlock)theDialog.TopBlock.FindBlock("txtMIDDLENUMBER");
            txtROUGHNUMBER        = (NXOpen.BlockStyler.IntegerBlock)theDialog.TopBlock.FindBlock("txtROUGHNUMBER");
            cboxMATNAME           = (NXOpen.BlockStyler.Enumeration)theDialog.TopBlock.FindBlock("cboxMATNAME");
            cboxMMATNAME          = (NXOpen.BlockStyler.Enumeration)theDialog.TopBlock.FindBlock("cboxMMATNAME");
            cboxRMATNAME          = (NXOpen.BlockStyler.Enumeration)theDialog.TopBlock.FindBlock("cboxRMATNAME");
            cbbProdirection       = (NXOpen.BlockStyler.Enumeration)theDialog.TopBlock.FindBlock("cbbProdirection");
            scrolledWindow1       = (NXOpen.BlockStyler.ScrolledWindow)theDialog.TopBlock.FindBlock("scrolledWindow1");
            txtFINISHSPACE        = (NXOpen.BlockStyler.DoubleBlock)theDialog.TopBlock.FindBlock("txtFINISHSPACE");
            txtMIDDLESPACE        = (NXOpen.BlockStyler.DoubleBlock)theDialog.TopBlock.FindBlock("txtMIDDLESPACE");
            txtROUGHSPACE         = (NXOpen.BlockStyler.DoubleBlock)theDialog.TopBlock.FindBlock("txtROUGHSPACE");
            cbbElecType           = (NXOpen.BlockStyler.Enumeration)theDialog.TopBlock.FindBlock("cbbElecType");
            cbbRock               = (NXOpen.BlockStyler.Enumeration)theDialog.TopBlock.FindBlock("cbbRock");
            stringExp             = (NXOpen.BlockStyler.StringBlock)theDialog.TopBlock.FindBlock("stringExp");
            stringExp1            = (NXOpen.BlockStyler.StringBlock)theDialog.TopBlock.FindBlock("stringExp1");
            scrolledWindow11      = (NXOpen.BlockStyler.ScrolledWindow)theDialog.TopBlock.FindBlock("scrolledWindow11");
            cbbFSmoth             = (NXOpen.BlockStyler.Enumeration)theDialog.TopBlock.FindBlock("cbbFSmoth");
            cbbMSmoth             = (NXOpen.BlockStyler.Enumeration)theDialog.TopBlock.FindBlock("cbbMSmoth");
            cbbRSmoth             = (NXOpen.BlockStyler.Enumeration)theDialog.TopBlock.FindBlock("cbbRSmoth");
            cbbChuckType          = (NXOpen.BlockStyler.Enumeration)theDialog.TopBlock.FindBlock("cbbChuckType");
            cbbCAPSET             = (NXOpen.BlockStyler.Enumeration)theDialog.TopBlock.FindBlock("cbbCAPSET");
            cbbRockShape          = (NXOpen.BlockStyler.Enumeration)theDialog.TopBlock.FindBlock("cbbRockShape");
            cbbShape              = (NXOpen.BlockStyler.Enumeration)theDialog.TopBlock.FindBlock("cbbShape");
        }
        catch (Exception ex)
        {
            //---- Enter your exception handling code here -----
            theUI.NXMessageBox.Show("Block Styler", NXMessageBox.DialogType.Error, ex.ToString());
        }
    }
Exemple #10
0
    //------------------------------------------------------------------------------
    //---------------------Block UI Styler Callback Functions--------------------------
    //------------------------------------------------------------------------------

    //------------------------------------------------------------------------------
    //Callback Name: initialize_cb
    //------------------------------------------------------------------------------
    public void initialize_cb()
    {
        try
        {
            group0                 = (NXOpen.BlockStyler.Group)theDialog.TopBlock.FindBlock("group0");
            list_postName          = (NXOpen.BlockStyler.ListBox)theDialog.TopBlock.FindBlock("list_postName");
            nativeFileBrowser_post = (NXOpen.BlockStyler.FileSelection)theDialog.TopBlock.FindBlock("nativeFileBrowser_post");
            group1                 = (NXOpen.BlockStyler.Group)theDialog.TopBlock.FindBlock("group1");
            string_outfile         = (NXOpen.BlockStyler.StringBlock)theDialog.TopBlock.FindBlock("string_outfile");
            string_lastName        = (NXOpen.BlockStyler.StringBlock)theDialog.TopBlock.FindBlock("string_lastName");
            nativeFile_outfilepath = (NXOpen.BlockStyler.FileSelection)theDialog.TopBlock.FindBlock("nativeFile_outfilepath");
            group         = (NXOpen.BlockStyler.Group)theDialog.TopBlock.FindBlock("group");
            string_Unit   = (NXOpen.BlockStyler.StringBlock)theDialog.TopBlock.FindBlock("string_Unit");
            toggle_showIt = (NXOpen.BlockStyler.Toggle)theDialog.TopBlock.FindBlock("toggle_showIt");
            string_alarm  = (NXOpen.BlockStyler.StringBlock)theDialog.TopBlock.FindBlock("string_alarm");
            string_check  = (NXOpen.BlockStyler.StringBlock)theDialog.TopBlock.FindBlock("string_check");
            //------------------------------------------------------------------------------
            //Registration of ListBox specific callbacks
            //------------------------------------------------------------------------------
            //list_postName.SetAddHandler(new NXOpen.BlockStyler.ListBox.AddCallback(AddCallback));

            //list_postName.SetDeleteHandler(new NXOpen.BlockStyler.ListBox.DeleteCallback(DeleteCallback));

            //------------------------------------------------------------------------------
            //------------------------------------------------------------------------------
            //Registration of StringBlock specific callbacks
            //------------------------------------------------------------------------------
            //string_outfile.SetKeystrokeCallback(new NXOpen.BlockStyler.StringBlock.KeystrokeCallback(KeystrokeCallback));

            //string_lastName.SetKeystrokeCallback(new NXOpen.BlockStyler.StringBlock.KeystrokeCallback(KeystrokeCallback));

            //string_Unit.SetKeystrokeCallback(new NXOpen.BlockStyler.StringBlock.KeystrokeCallback(KeystrokeCallback));

            //string_alarm.SetKeystrokeCallback(new NXOpen.BlockStyler.StringBlock.KeystrokeCallback(KeystrokeCallback));

            //string_check.SetKeystrokeCallback(new NXOpen.BlockStyler.StringBlock.KeystrokeCallback(KeystrokeCallback));

            //------------------------------------------------------------------------------
        }
        catch (Exception ex)
        {
            //---- Enter your exception handling code here -----
            theUI.NXMessageBox.Show("Block Styler", NXMessageBox.DialogType.Error, ex.ToString());
        }
    }
Exemple #11
0
 public void initialize_cb()
 {
     try
     {
         group    = (NXOpen.BlockStyler.Group)theDialog.TopBlock.FindBlock("group");
         sSR      = (NXOpen.BlockStyler.StringBlock)theDialog.TopBlock.FindBlock("sSR");
         eZF      = (NXOpen.BlockStyler.Enumeration)theDialog.TopBlock.FindBlock("eZF");
         dMH      = (NXOpen.BlockStyler.DoubleBlock)theDialog.TopBlock.FindBlock("dMH");
         dRunnerD = (NXOpen.BlockStyler.DoubleBlock)theDialog.TopBlock.FindBlock("dRunnerD");
         dOffset  = (NXOpen.BlockStyler.DoubleBlock)theDialog.TopBlock.FindBlock("dOffset");
         sTin     = (NXOpen.BlockStyler.StringBlock)theDialog.TopBlock.FindBlock("sTin");
         sBin     = (NXOpen.BlockStyler.StringBlock)theDialog.TopBlock.FindBlock("sBin");
         group1   = (NXOpen.BlockStyler.Group)theDialog.TopBlock.FindBlock("group1");
         dCH      = (NXOpen.BlockStyler.DoubleBlock)theDialog.TopBlock.FindBlock("dCH");
     }
     catch (Exception ex)
     {
         theUI.NXMessageBox.Show("Block Styler", NXMessageBox.DialogType.Error, ex.ToString());
     }
 }
Exemple #12
0
    //------------------------------------------------------------------------------
    //---------------------Block UI Styler Callback Functions--------------------------
    //------------------------------------------------------------------------------

    //------------------------------------------------------------------------------
    //Callback Name: initialize_cb
    //------------------------------------------------------------------------------
    public void initialize_cb()
    {
        try
        {
            group          = (NXOpen.BlockStyler.Group)theDialog.TopBlock.FindBlock("group");
            bodySelect0    = (NXOpen.BlockStyler.SelectObject)theDialog.TopBlock.FindBlock("bodySelect0");
            plane0         = (NXOpen.BlockStyler.SpecifyPlane)theDialog.TopBlock.FindBlock("plane0");
            stringElecName = (NXOpen.BlockStyler.StringBlock)theDialog.TopBlock.FindBlock("stringElecName");
            toggleJiaju    = (NXOpen.BlockStyler.Toggle)theDialog.TopBlock.FindBlock("toggleJiaju");
            selectionJiaju = (NXOpen.BlockStyler.SelectObject)theDialog.TopBlock.FindBlock("selectionJiaju");
            toggle0        = (NXOpen.BlockStyler.Toggle)theDialog.TopBlock.FindBlock("toggle0");
            groupXYZ       = (NXOpen.BlockStyler.Group)theDialog.TopBlock.FindBlock("groupXYZ");
            expressionX    = (NXOpen.BlockStyler.ExpressionBlock)theDialog.TopBlock.FindBlock("expressionX");
            expressionY    = (NXOpen.BlockStyler.ExpressionBlock)theDialog.TopBlock.FindBlock("expressionY");
            expressionZ    = (NXOpen.BlockStyler.ExpressionBlock)theDialog.TopBlock.FindBlock("expressionZ");
        }
        catch (Exception ex)
        {
            //---- Enter your exception handling code here -----
            theUI.NXMessageBox.Show("Block Styler", NXMessageBox.DialogType.Error, ex.ToString());
        }
    }
        //------------------------------------------------------------------------------
        //---------------------Block UI Styler Callback Functions--------------------------
        //------------------------------------------------------------------------------

        //------------------------------------------------------------------------------
        //Callback Name: initialize_cb
        //------------------------------------------------------------------------------
        public void initialize_cb()
        {
            try
            {
                group0   = (NXOpen.BlockStyler.Group)theDialog.TopBlock.FindBlock("group0");
                string0  = (NXOpen.BlockStyler.StringBlock)theDialog.TopBlock.FindBlock("string0");
                string01 = (NXOpen.BlockStyler.StringBlock)theDialog.TopBlock.FindBlock("string01");
                //------------------------------------------------------------------------------
                //Registration of StringBlock specific callbacks
                //------------------------------------------------------------------------------
                //string0.SetKeystrokeCallback(new NXOpen.BlockStyler.StringBlock.KeystrokeCallback(KeystrokeCallback));

                //string01.SetKeystrokeCallback(new NXOpen.BlockStyler.StringBlock.KeystrokeCallback(KeystrokeCallback));

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

    //------------------------------------------------------------------------------
    //Callback Name: initialize_cb
    //------------------------------------------------------------------------------
    public void initialize_cb()
    {
        try
        {
            label0             = (NXOpen.BlockStyler.Label)theDialog.TopBlock.FindBlock("label0");
            explorer           = (NXOpen.BlockStyler.Explorer)theDialog.TopBlock.FindBlock("explorer");
            explorerNode       = (NXOpen.BlockStyler.Group)theDialog.TopBlock.FindBlock("explorerNode");
            stringLabelTool    = (NXOpen.BlockStyler.Label)theDialog.TopBlock.FindBlock("stringLabelTool");
            integerToolDiam    = (NXOpen.BlockStyler.IntegerBlock)theDialog.TopBlock.FindBlock("integerToolDiam");
            separator011       = (NXOpen.BlockStyler.Separator)theDialog.TopBlock.FindBlock("separator011");
            offsetOfTool       = (NXOpen.BlockStyler.IntegerBlock)theDialog.TopBlock.FindBlock("offsetOfTool");
            separator02        = (NXOpen.BlockStyler.Separator)theDialog.TopBlock.FindBlock("separator02");
            multiline_string01 = (NXOpen.BlockStyler.MultilineString)theDialog.TopBlock.FindBlock("multiline_string01");
            separator03        = (NXOpen.BlockStyler.Separator)theDialog.TopBlock.FindBlock("separator03");
            stringLabelHolder  = (NXOpen.BlockStyler.Label)theDialog.TopBlock.FindBlock("stringLabelHolder");
            separator04        = (NXOpen.BlockStyler.Separator)theDialog.TopBlock.FindBlock("separator04");
            stringLibRef1      = (NXOpen.BlockStyler.StringBlock)theDialog.TopBlock.FindBlock("stringLibRef1");
            separator05        = (NXOpen.BlockStyler.Separator)theDialog.TopBlock.FindBlock("separator05");
            multiline_string0  = (NXOpen.BlockStyler.MultilineString)theDialog.TopBlock.FindBlock("multiline_string0");
            separator06        = (NXOpen.BlockStyler.Separator)theDialog.TopBlock.FindBlock("separator06");
            tree_control0      = (NXOpen.BlockStyler.Tree)theDialog.TopBlock.FindBlock("tree_control0");
            //------------------------------------------------------------------------------
            //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));

            //------------------------------------------------------------------------------
            //------------------------------------------------------------------------------
            //Registration of StringBlock specific callbacks
            //------------------------------------------------------------------------------
            //stringLibRef1.SetKeystrokeCallback(new NXOpen.BlockStyler.StringBlock.KeystrokeCallback(KeystrokeCallback));

            //------------------------------------------------------------------------------
            //------------------------------------------------------------------------------
            //Registration of Explorer, explorer specific callbacks
            //------------------------------------------------------------------------------
            //explorer.SetNotifyNodeSelectedPreHandler(new NXOpen.BlockStyler.Explorer.NotifyNodeSelectedPreCallback(notifyNodeSelectedPreCallback));

            //explorer.SetNotifyNodeSelectedPostHandler(new NXOpen.BlockStyler.Explorer.NotifyNodeSelectedPostCallback(notifyNodeSelectedPostCallback));
        }
        catch (Exception ex)
        {
            //---- Enter your exception handling code here -----
            theUI.NXMessageBox.Show("Block Styler", NXMessageBox.DialogType.Error, ex.ToString());
        }
    }
Exemple #15
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());
            }
        }
    //------------------------------------------------------------------------------
    //---------------------Block UI Styler Callback Functions--------------------------
    //------------------------------------------------------------------------------

    //------------------------------------------------------------------------------
    //Callback Name: initialize_cb
    //------------------------------------------------------------------------------
    public void initialize_cb()
    {
        try
        {
            tabControl   = (NXOpen.BlockStyler.TabControl)theDialog.TopBlock.FindBlock("tabControl");
            tabPage      = (NXOpen.BlockStyler.Group)theDialog.TopBlock.FindBlock("tabPage");
            group5       = (NXOpen.BlockStyler.Group)theDialog.TopBlock.FindBlock("group5");
            string0      = (NXOpen.BlockStyler.StringBlock)theDialog.TopBlock.FindBlock("string0");
            string01     = (NXOpen.BlockStyler.StringBlock)theDialog.TopBlock.FindBlock("string01");
            enum0        = (NXOpen.BlockStyler.Enumeration)theDialog.TopBlock.FindBlock("enum0");
            separator0   = (NXOpen.BlockStyler.Separator)theDialog.TopBlock.FindBlock("separator0");
            enum01       = (NXOpen.BlockStyler.Enumeration)theDialog.TopBlock.FindBlock("enum01");
            string02     = (NXOpen.BlockStyler.StringBlock)theDialog.TopBlock.FindBlock("string02");
            separator01  = (NXOpen.BlockStyler.Separator)theDialog.TopBlock.FindBlock("separator01");
            enum02       = (NXOpen.BlockStyler.Enumeration)theDialog.TopBlock.FindBlock("enum02");
            string03     = (NXOpen.BlockStyler.StringBlock)theDialog.TopBlock.FindBlock("string03");
            separator02  = (NXOpen.BlockStyler.Separator)theDialog.TopBlock.FindBlock("separator02");
            enum03       = (NXOpen.BlockStyler.Enumeration)theDialog.TopBlock.FindBlock("enum03");
            string04     = (NXOpen.BlockStyler.StringBlock)theDialog.TopBlock.FindBlock("string04");
            separator03  = (NXOpen.BlockStyler.Separator)theDialog.TopBlock.FindBlock("separator03");
            enum04       = (NXOpen.BlockStyler.Enumeration)theDialog.TopBlock.FindBlock("enum04");
            string05     = (NXOpen.BlockStyler.StringBlock)theDialog.TopBlock.FindBlock("string05");
            separator04  = (NXOpen.BlockStyler.Separator)theDialog.TopBlock.FindBlock("separator04");
            string06     = (NXOpen.BlockStyler.StringBlock)theDialog.TopBlock.FindBlock("string06");
            button0      = (NXOpen.BlockStyler.Button)theDialog.TopBlock.FindBlock("button0");
            button01     = (NXOpen.BlockStyler.Button)theDialog.TopBlock.FindBlock("button01");
            tabPage1     = (NXOpen.BlockStyler.Group)theDialog.TopBlock.FindBlock("tabPage1");
            group        = (NXOpen.BlockStyler.Group)theDialog.TopBlock.FindBlock("group");
            integer0     = (NXOpen.BlockStyler.IntegerBlock)theDialog.TopBlock.FindBlock("integer0");
            integer01    = (NXOpen.BlockStyler.IntegerBlock)theDialog.TopBlock.FindBlock("integer01");
            separator06  = (NXOpen.BlockStyler.Separator)theDialog.TopBlock.FindBlock("separator06");
            enum05       = (NXOpen.BlockStyler.Enumeration)theDialog.TopBlock.FindBlock("enum05");
            enum06       = (NXOpen.BlockStyler.Enumeration)theDialog.TopBlock.FindBlock("enum06");
            group1       = (NXOpen.BlockStyler.Group)theDialog.TopBlock.FindBlock("group1");
            toggle0      = (NXOpen.BlockStyler.Toggle)theDialog.TopBlock.FindBlock("toggle0");
            separator07  = (NXOpen.BlockStyler.Separator)theDialog.TopBlock.FindBlock("separator07");
            enum07       = (NXOpen.BlockStyler.Enumeration)theDialog.TopBlock.FindBlock("enum07");
            integer02    = (NXOpen.BlockStyler.IntegerBlock)theDialog.TopBlock.FindBlock("integer02");
            separator08  = (NXOpen.BlockStyler.Separator)theDialog.TopBlock.FindBlock("separator08");
            button02     = (NXOpen.BlockStyler.Button)theDialog.TopBlock.FindBlock("button02");
            group2       = (NXOpen.BlockStyler.Group)theDialog.TopBlock.FindBlock("group2");
            toggle01     = (NXOpen.BlockStyler.Toggle)theDialog.TopBlock.FindBlock("toggle01");
            separator09  = (NXOpen.BlockStyler.Separator)theDialog.TopBlock.FindBlock("separator09");
            enum09       = (NXOpen.BlockStyler.Enumeration)theDialog.TopBlock.FindBlock("enum09");
            integer021   = (NXOpen.BlockStyler.IntegerBlock)theDialog.TopBlock.FindBlock("integer021");
            separator010 = (NXOpen.BlockStyler.Separator)theDialog.TopBlock.FindBlock("separator010");
            button03     = (NXOpen.BlockStyler.Button)theDialog.TopBlock.FindBlock("button03");
            group3       = (NXOpen.BlockStyler.Group)theDialog.TopBlock.FindBlock("group3");
            toggle02     = (NXOpen.BlockStyler.Toggle)theDialog.TopBlock.FindBlock("toggle02");
            enum011      = (NXOpen.BlockStyler.Enumeration)theDialog.TopBlock.FindBlock("enum011");
            integer022   = (NXOpen.BlockStyler.IntegerBlock)theDialog.TopBlock.FindBlock("integer022");
            separator011 = (NXOpen.BlockStyler.Separator)theDialog.TopBlock.FindBlock("separator011");
            button04     = (NXOpen.BlockStyler.Button)theDialog.TopBlock.FindBlock("button04");
            button05     = (NXOpen.BlockStyler.Button)theDialog.TopBlock.FindBlock("button05");
            tabPage2     = (NXOpen.BlockStyler.Group)theDialog.TopBlock.FindBlock("tabPage2");
            group4       = (NXOpen.BlockStyler.Group)theDialog.TopBlock.FindBlock("group4");
            toggle03     = (NXOpen.BlockStyler.Toggle)theDialog.TopBlock.FindBlock("toggle03");
            button06     = (NXOpen.BlockStyler.Button)theDialog.TopBlock.FindBlock("button06");

            _dataService.initialize_AttributeDataBinding();
            _dataService.initialize_DrawingsDataBinding();
        }
        catch (Exception ex)
        {
            //---- Enter your exception handling code here -----
            theUI.NXMessageBox.Show("Block Styler", NXMessageBox.DialogType.Error, ex.ToString());
        }
    }
Exemple #17
0
    //------------------------------------------------------------------------------
    //---------------------Block UI Styler Callback Functions--------------------------
    //------------------------------------------------------------------------------

    //------------------------------------------------------------------------------
    //Callback Name: initialize_cb
    //------------------------------------------------------------------------------
    public void initialize_cb()
    {
        try
        {
            grpSelection  = (NXOpen.BlockStyler.Group)theDialog.TopBlock.FindBlock("grpSelection");
            strWildcard   = (NXOpen.BlockStyler.StringBlock)theDialog.TopBlock.FindBlock("strWildcard");
            lblInfo       = (NXOpen.BlockStyler.Label)theDialog.TopBlock.FindBlock("lblInfo");
            tree          = (NXOpen.BlockStyler.Tree)theDialog.TopBlock.FindBlock("tree");
            lblHits       = (NXOpen.BlockStyler.Label)theDialog.TopBlock.FindBlock("lblHits");
            grpSelection1 = (NXOpen.BlockStyler.Group)theDialog.TopBlock.FindBlock("grpSelection1");
            lblBitmap     = (NXOpen.BlockStyler.Label)theDialog.TopBlock.FindBlock("lblBitmap");
            lblBitmapName = (NXOpen.BlockStyler.Label)theDialog.TopBlock.FindBlock("lblBitmapName");
            btnCopy       = (NXOpen.BlockStyler.Button)theDialog.TopBlock.FindBlock("btnCopy");
            //------------------------------------------------------------------------------
            //Registration of Treelist specific callbacks
            //------------------------------------------------------------------------------
            //tree.SetOnExpandHandler(new NXOpen.BlockStyler.Tree.OnExpandCallback(OnExpandCallback));

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            //------------------------------------------------------------------------------
            //------------------------------------------------------------------------------
            //Registration of StringBlock specific callbacks
            //------------------------------------------------------------------------------
            //strWildcard.SetKeystrokeCallback(new NXOpen.BlockStyler.StringBlock.KeystrokeCallback(KeystrokeCallback));

            //------------------------------------------------------------------------------

            names   = new List <String>(File.ReadAllLines(NamesFile));
            matches = new List <String>();
        }
        catch (Exception ex)
        {
            //---- Enter your exception handling code here -----
            theUI.NXMessageBox.Show("Block Styler", NXMessageBox.DialogType.Error, ex.ToString());
        }
    }
Exemple #18
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());
        }
    }