//------------------------------------------------------------------------------
        //---------------------Block UI Styler Callback Functions--------------------------
        //------------------------------------------------------------------------------

        //------------------------------------------------------------------------------
        //Callback Name: initialize_cb
        //------------------------------------------------------------------------------
        public void initialize_cb()
        {
            try
            {
                group0           = (NXOpen.BlockStyler.Group)theDialog.TopBlock.FindBlock("group0");
                LB_Solutions     = (NXOpen.BlockStyler.ListBox)theDialog.TopBlock.FindBlock("LB_Solutions");
                button_SelectAll = (NXOpen.BlockStyler.Button)theDialog.TopBlock.FindBlock("button_SelectAll");
                separator0       = (NXOpen.BlockStyler.Separator)theDialog.TopBlock.FindBlock("separator0");
                BTN_Generate     = (NXOpen.BlockStyler.Button)theDialog.TopBlock.FindBlock("BTN_Generate");
                //------------------------------------------------------------------------------
                //Registration of ListBox specific callbacks
                //------------------------------------------------------------------------------
                //LB_Solutions.SetAddHandler(new NXOpen.BlockStyler.ListBox.AddCallback(AddCallback));

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

                //------------------------------------------------------------------------------
            }
            catch (Exception ex)
            {
                //---- Enter your exception handling code here -----
                theUI.NXMessageBox.Show("Block Styler", NXMessageBox.DialogType.Error, ex.ToString());
            }
        }
Exemplo n.º 2
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());
        }
    }
Exemplo n.º 3
0
    //------------------------------------------------------------------------------
    //---------------------Block UI Styler Callback Functions--------------------------
    //------------------------------------------------------------------------------

    //------------------------------------------------------------------------------
    //Callback Name: initialize_cb
    //------------------------------------------------------------------------------
    public void initialize_cb()
    {
        try
        {
            group3        = (NXOpen.BlockStyler.Group)theDialog.TopBlock.FindBlock("group3");
            button05      = (NXOpen.BlockStyler.Button)theDialog.TopBlock.FindBlock("button05");
            face_select0  = (NXOpen.BlockStyler.FaceCollector)theDialog.TopBlock.FindBlock("face_select0");
            face_select01 = (NXOpen.BlockStyler.FaceCollector)theDialog.TopBlock.FindBlock("face_select01");
            face_select02 = (NXOpen.BlockStyler.FaceCollector)theDialog.TopBlock.FindBlock("face_select02");
            enum01        = (NXOpen.BlockStyler.Enumeration)theDialog.TopBlock.FindBlock("enum01");
            button04      = (NXOpen.BlockStyler.Button)theDialog.TopBlock.FindBlock("button04");
            group1        = (NXOpen.BlockStyler.Group)theDialog.TopBlock.FindBlock("group1");
            enum0         = (NXOpen.BlockStyler.Enumeration)theDialog.TopBlock.FindBlock("enum0");
            group         = (NXOpen.BlockStyler.Group)theDialog.TopBlock.FindBlock("group");
            label04       = (NXOpen.BlockStyler.Label)theDialog.TopBlock.FindBlock("label04");
            separator02   = (NXOpen.BlockStyler.Separator)theDialog.TopBlock.FindBlock("separator02");
            toggle0       = (NXOpen.BlockStyler.Toggle)theDialog.TopBlock.FindBlock("toggle0");
            double0       = (NXOpen.BlockStyler.DoubleBlock)theDialog.TopBlock.FindBlock("double0");
            toggle01      = (NXOpen.BlockStyler.Toggle)theDialog.TopBlock.FindBlock("toggle01");
            double01      = (NXOpen.BlockStyler.DoubleBlock)theDialog.TopBlock.FindBlock("double01");
            toggle02      = (NXOpen.BlockStyler.Toggle)theDialog.TopBlock.FindBlock("toggle02");
            double02      = (NXOpen.BlockStyler.DoubleBlock)theDialog.TopBlock.FindBlock("double02");
            separator01   = (NXOpen.BlockStyler.Separator)theDialog.TopBlock.FindBlock("separator01");
            enum02        = (NXOpen.BlockStyler.Enumeration)theDialog.TopBlock.FindBlock("enum02");
            enum03        = (NXOpen.BlockStyler.Enumeration)theDialog.TopBlock.FindBlock("enum03");
            double03      = (NXOpen.BlockStyler.DoubleBlock)theDialog.TopBlock.FindBlock("double03");
            separator0    = (NXOpen.BlockStyler.Separator)theDialog.TopBlock.FindBlock("separator0");
            tree_control0 = (NXOpen.BlockStyler.Tree)theDialog.TopBlock.FindBlock("tree_control0");
            button0       = (NXOpen.BlockStyler.Button)theDialog.TopBlock.FindBlock("button0");
            button01      = (NXOpen.BlockStyler.Button)theDialog.TopBlock.FindBlock("button01");
            button02      = (NXOpen.BlockStyler.Button)theDialog.TopBlock.FindBlock("button02");
            button03      = (NXOpen.BlockStyler.Button)theDialog.TopBlock.FindBlock("button03");
            button06      = (NXOpen.BlockStyler.Button)theDialog.TopBlock.FindBlock("button06");
            button07      = (NXOpen.BlockStyler.Button)theDialog.TopBlock.FindBlock("button07");
            button08      = (NXOpen.BlockStyler.Button)theDialog.TopBlock.FindBlock("button08");
            //------------------------------------------------------------------------------
            //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());
        }
    }
    //------------------------------------------------------------------------------
    //---------------------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());
        }
    }