예제 #1
0
 //------------------------------------------------------------------------------
 //Callback Name: initialize_cb
 //------------------------------------------------------------------------------
 public void initialize_cb()
 {
     try
     {
         //tabControl = Snap.UI.Block.Group.GetBlock(theDialog,"tabControl");
         tabPage       = Snap.UI.Block.Group.GetBlock(theDialog, "tabPage");
         group5        = Snap.UI.Block.Group.GetBlock(theDialog, "group5");
         enum02        = Snap.UI.Block.Enumeration.GetBlock(theDialog, "enum02");
         group         = Snap.UI.Block.Group.GetBlock(theDialog, "group");
         bodySelect0   = Snap.UI.Block.SelectObject.GetBlock(theDialog, "bodySelect0");
         vector0       = Snap.UI.Block.SpecifyVector.GetBlock(theDialog, "vector0");
         group1        = Snap.UI.Block.Group.GetBlock(theDialog, "group1");
         enum0         = Snap.UI.Block.Enumeration.GetBlock(theDialog, "enum0");
         label01       = Snap.UI.Block.LabelBlock.GetBlock(theDialog, "label01");
         button0       = Snap.UI.Block.Button.GetBlock(theDialog, "button0");
         tabPage1      = Snap.UI.Block.Group.GetBlock(theDialog, "tabPage1");
         group2        = Snap.UI.Block.Group.GetBlock(theDialog, "group2");
         double0       = Snap.UI.Block.Double.GetBlock(theDialog, "double0");
         label0        = Snap.UI.Block.LabelBlock.GetBlock(theDialog, "label0");
         toggle0       = Snap.UI.Block.Toggle.GetBlock(theDialog, "toggle0");
         colorPicker0  = Snap.UI.Block.ColorPicker.GetBlock(theDialog, "colorPicker0");
         toggle01      = Snap.UI.Block.Toggle.GetBlock(theDialog, "toggle01");
         colorPicker01 = Snap.UI.Block.ColorPicker.GetBlock(theDialog, "colorPicker01");
         toggle02      = Snap.UI.Block.Toggle.GetBlock(theDialog, "toggle02");
         colorPicker02 = Snap.UI.Block.ColorPicker.GetBlock(theDialog, "colorPicker02");
         toggle03      = Snap.UI.Block.Toggle.GetBlock(theDialog, "toggle03");
         colorPicker03 = Snap.UI.Block.ColorPicker.GetBlock(theDialog, "colorPicker03");
         toggle04      = Snap.UI.Block.Toggle.GetBlock(theDialog, "toggle04");
         colorPicker04 = Snap.UI.Block.ColorPicker.GetBlock(theDialog, "colorPicker04");
         toggle05      = Snap.UI.Block.Toggle.GetBlock(theDialog, "toggle05");
         colorPicker05 = Snap.UI.Block.ColorPicker.GetBlock(theDialog, "colorPicker05");
         button01      = Snap.UI.Block.Button.GetBlock(theDialog, "button01");
         group4        = Snap.UI.Block.Group.GetBlock(theDialog, "group4");
         label02       = Snap.UI.Block.LabelBlock.GetBlock(theDialog, "label02");
         integer0      = Snap.UI.Block.Integer.GetBlock(theDialog, "integer0");
         label03       = Snap.UI.Block.LabelBlock.GetBlock(theDialog, "label03");
         integer01     = Snap.UI.Block.Integer.GetBlock(theDialog, "integer01");
         group3        = Snap.UI.Block.Group.GetBlock(theDialog, "group3");
         face_select0  = Snap.UI.Block.FaceCollector.GetBlock(theDialog, "face_select0");
         enum01        = Snap.UI.Block.Enumeration.GetBlock(theDialog, "enum01");
         button02      = Snap.UI.Block.Button.GetBlock(theDialog, "button02");
     }
     catch (Exception ex)
     {
         theUI.NXMessageBox.Show("Block Styler", NXMessageBox.DialogType.Error, ex.ToString());
     }
 }
예제 #2
0
    //------------------------------------------------------------------------------
    //---------------------Block UI Styler Callback Functions--------------------------
    //------------------------------------------------------------------------------

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