Beispiel #1
0
 //------------------------------------------------------------------------------
 //Callback Name: initialize_cb
 //------------------------------------------------------------------------------
 public void initialize_cb()
 {
     try
     {
         tabControl    = theDialog.TopBlock.FindBlock("tabControl");
         tabPage       = theDialog.TopBlock.FindBlock("tabPage");
         group5        = theDialog.TopBlock.FindBlock("group5");
         enum02        = theDialog.TopBlock.FindBlock("enum02");
         group1        = theDialog.TopBlock.FindBlock("group1");
         enum0         = theDialog.TopBlock.FindBlock("enum0");
         label01       = theDialog.TopBlock.FindBlock("label01");
         button0       = theDialog.TopBlock.FindBlock("button0");
         tabPage1      = theDialog.TopBlock.FindBlock("tabPage1");
         group4        = theDialog.TopBlock.FindBlock("group4");
         label02       = theDialog.TopBlock.FindBlock("label02");
         integer0      = theDialog.TopBlock.FindBlock("integer0");
         label03       = theDialog.TopBlock.FindBlock("label03");
         integer01     = theDialog.TopBlock.FindBlock("integer01");
         group3        = theDialog.TopBlock.FindBlock("group3");
         face_select0  = theDialog.TopBlock.FindBlock("face_select0");
         enum01        = theDialog.TopBlock.FindBlock("enum01");
         button02      = theDialog.TopBlock.FindBlock("button02");
         group         = theDialog.TopBlock.FindBlock("group");
         bodySelect0   = theDialog.TopBlock.FindBlock("bodySelect0");
         vector0       = theDialog.TopBlock.FindBlock("vector0");
         group2        = theDialog.TopBlock.FindBlock("group2");
         double0       = theDialog.TopBlock.FindBlock("double0");
         label0        = theDialog.TopBlock.FindBlock("label0");
         toggle0       = theDialog.TopBlock.FindBlock("toggle0");
         colorPicker0  = theDialog.TopBlock.FindBlock("colorPicker0");
         toggle01      = theDialog.TopBlock.FindBlock("toggle01");
         colorPicker01 = theDialog.TopBlock.FindBlock("colorPicker01");
         toggle02      = theDialog.TopBlock.FindBlock("toggle02");
         colorPicker02 = theDialog.TopBlock.FindBlock("colorPicker02");
         toggle03      = theDialog.TopBlock.FindBlock("toggle03");
         colorPicker03 = theDialog.TopBlock.FindBlock("colorPicker03");
         toggle04      = theDialog.TopBlock.FindBlock("toggle04");
         colorPicker04 = theDialog.TopBlock.FindBlock("colorPicker04");
         toggle05      = theDialog.TopBlock.FindBlock("toggle05");
         colorPicker05 = theDialog.TopBlock.FindBlock("colorPicker05");
         button01      = theDialog.TopBlock.FindBlock("button01");
     }
     catch (Exception ex)
     {
         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());
        }
    }