Esempio n. 1
0
        public static string GetString(string cue = "Please enter a text string in the dialog", string title = "Enter Text", string label = "Text", string initialValue = "Enter text here")
        {
            BlockForm form = new BlockForm(cue, title);

            Snap.UI.Block.String str = new Snap.UI.Block.String(label)
            {
                Value = initialValue
            };
            form.AddBlocks(new General[] { str });
            form.Show(DialogMode.Edit);
            return(str.Value);
        }
Esempio n. 2
0
    //------------------------------------------------------------------------------
    //---------------------Block UI Styler Callback Functions--------------------------
    //------------------------------------------------------------------------------

    //------------------------------------------------------------------------------
    //Callback Name: initialize_cb
    //------------------------------------------------------------------------------
    public void initialize_cb()
    {
        try
        {
            group              = Snap.UI.Block.Group.GetBlock(theDialog, "group");
            selectCuprum       = Snap.UI.Block.SelectObject.GetBlock(theDialog, "selectCuprum");
            strElecName        = Snap.UI.Block.String.GetBlock(theDialog, "strElecName");
            stringExp          = Snap.UI.Block.String.GetBlock(theDialog, "stringExp");
            stringExp1         = Snap.UI.Block.String.GetBlock(theDialog, "stringExp1");
            strElecSize        = Snap.UI.Block.String.GetBlock(theDialog, "strElecSize");
            strElecCuttingSize = Snap.UI.Block.String.GetBlock(theDialog, "strElecCuttingSize");
            group1             = Snap.UI.Block.Group.GetBlock(theDialog, "group1");
            //scrolledWindow = (NXOpen.BlockStyler.ScrolledWindow)theDialog.TopBlock.FindBlock("scrolledWindow");
            txtFINISHNUMBER = Snap.UI.Block.Integer.GetBlock(theDialog, "txtFINISHNUMBER");
            txtMIDDLENUMBER = Snap.UI.Block.Integer.GetBlock(theDialog, "txtMIDDLENUMBER");
            txtROUGHNUMBER  = Snap.UI.Block.Integer.GetBlock(theDialog, "txtROUGHNUMBER");
            cboxMATNAME     = Snap.UI.Block.Enumeration.GetBlock(theDialog, "cboxMATNAME");
            cboxMMATNAME    = Snap.UI.Block.Enumeration.GetBlock(theDialog, "cboxMMATNAME");
            cboxRMATNAME    = Snap.UI.Block.Enumeration.GetBlock(theDialog, "cboxRMATNAME");
            cbbProdirection = Snap.UI.Block.Enumeration.GetBlock(theDialog, "cbbProdirection");
            cbbRockShape    = Snap.UI.Block.Enumeration.GetBlock(theDialog, "cbbRockShape");
            cbbShape        = Snap.UI.Block.Enumeration.GetBlock(theDialog, "cbbShape");
            //scrolledWindow1 = (NXOpen.BlockStyler.ScrolledWindow)theDialog.TopBlock.FindBlock("scrolledWindow1");
            txtFINISHSPACE = Snap.UI.Block.Double.GetBlock(theDialog, "txtFINISHSPACE");
            txtMIDDLESPACE = Snap.UI.Block.Double.GetBlock(theDialog, "txtMIDDLESPACE");
            txtROUGHSPACE  = Snap.UI.Block.Double.GetBlock(theDialog, "txtROUGHSPACE");
            cbbElecType    = Snap.UI.Block.Enumeration.GetBlock(theDialog, "cbbElecType");
            cbbRock        = Snap.UI.Block.Enumeration.GetBlock(theDialog, "cbbRock");
            //scrolledWindow11 = (NXOpen.BlockStyler.ScrolledWindow)theDialog.TopBlock.FindBlock("scrolledWindow11");
            cbbFSmoth    = Snap.UI.Block.Enumeration.GetBlock(theDialog, "cbbFSmoth");
            cbbMSmoth    = Snap.UI.Block.Enumeration.GetBlock(theDialog, "cbbMSmoth");
            cbbRSmoth    = Snap.UI.Block.Enumeration.GetBlock(theDialog, "cbbRSmoth");
            cbbChuckType = Snap.UI.Block.Enumeration.GetBlock(theDialog, "cbbChuckType");
            //CAPSET
            cbbCAPSET      = Snap.UI.Block.Enumeration.GetBlock(theDialog, "cbbCAPSET");
            groupSElec     = Snap.UI.Block.Group.GetBlock(theDialog, "groupSElec");                          // Block type: Group
            selectTopFace  = Snap.UI.Block.SelectObject.GetBlock(theDialog, "selectTopFace");                // Block type: Selection
            selectBaseFace = Snap.UI.Block.SelectObject.GetBlock(theDialog, "selectBaseFace");               // Block type: Selection
            //selectBaseFacePoint=Snap.UI.Block.SelectObject.GetBlock(theDialog, "selectBaseFacePoint");// Block type: Selection
            selectBaseFacePointEx = Snap.UI.Block.SpecifyPoint.GetBlock(theDialog, "selectBaseFacePointEx"); // Block type: Selection
        }
        catch (Exception ex)
        {
            //---- Enter your exception handling code here -----
            theUI.NXMessageBox.Show("Block Styler", NXMessageBox.DialogType.Error, ex.ToString());
        }
    }
Esempio n. 3
0
        public static string[] GetStrings(string title, string[] labels, string[] initialValues)
        {
            BlockForm form = new BlockForm(title);

            Snap.UI.Block.String[] blocks = new Snap.UI.Block.String[labels.Length];
            for (int i = 0; i < blocks.Length; i++)
            {
                blocks[i] = new Snap.UI.Block.String(labels[i]);
            }
            form.AddBlocks(blocks);
            form.Show(DialogMode.Edit);
            string[] strArray2 = new string[blocks.Length];
            for (int j = 0; j < strArray2.Length; j++)
            {
                strArray2[j] = blocks[j].Value;
            }
            return(strArray2);
        }
Esempio n. 4
0
    //------------------------------------------------------------------------------
    //---------------------Block UI Styler Callback Functions--------------------------
    //------------------------------------------------------------------------------

    //------------------------------------------------------------------------------
    //Callback Name: initialize_cb
    //------------------------------------------------------------------------------
    public void initialize_cb()
    {
        try
        {
            group          = Snap.UI.Block.Group.GetBlock(theDialog, "group");
            bodySelect0    = Snap.UI.Block.SelectObject.GetBlock(theDialog, "bodySelect0");
            plane0         = Snap.UI.Block.SpecifyPlane.GetBlock(theDialog, "plane0");
            stringElecName = Snap.UI.Block.String.GetBlock(theDialog, "stringElecName");
            toggleJiaju    = Snap.UI.Block.Toggle.GetBlock(theDialog, "toggleJiaju");
            selectionJiaju = Snap.UI.Block.SelectObject.GetBlock(theDialog, "selectionJiaju");
            toggle0        = Snap.UI.Block.Toggle.GetBlock(theDialog, "toggle0");
            groupXYZ       = Snap.UI.Block.Group.GetBlock(theDialog, "groupXYZ");
            expressionX    = Snap.UI.Block.Expression.GetBlock(theDialog, "expressionX");
            expressionY    = Snap.UI.Block.Expression.GetBlock(theDialog, "expressionY");
            expressionZ    = Snap.UI.Block.Expression.GetBlock(theDialog, "expressionZ");
        }
        catch (Exception ex)
        {
            //---- Enter your exception handling code here -----
            theUI.NXMessageBox.Show("Block Styler", NXMessageBox.DialogType.Error, ex.ToString());
        }
    }
Esempio n. 5
0
    //------------------------------------------------------------------------------
    //---------------------Block UI Styler Callback Functions--------------------------
    //------------------------------------------------------------------------------

    //------------------------------------------------------------------------------
    //Callback Name: initialize_cb
    //------------------------------------------------------------------------------
    public void initialize_cb()
    {
        try
        {
            group1                      = Snap.UI.Block.Group.GetBlock(theDialog, "group1");
            selectSteel                 = Snap.UI.Block.SelectObject.GetBlock(theDialog, "selectSteel");
            group                       = Snap.UI.Block.Group.GetBlock(theDialog, "group");
            sMODELNUMBER                = Snap.UI.Block.String.GetBlock(theDialog, "sMODELNUMBER");
            sMRNUMBER                   = Snap.UI.Block.String.GetBlock(theDialog, "sMRNUMBER");
            eMATERAL                    = Snap.UI.Block.Enumeration.GetBlock(theDialog, "eMATERAL");
            enumSelectedXX              = Snap.UI.Block.Enumeration.GetBlock(theDialog, "enumSelectedXX");
            enum0                       = Snap.UI.Block.Enumeration.GetBlock(theDialog, "enum0");
            coord_system0               = Snap.UI.Block.SpecifyCsys.GetBlock(theDialog, "coord_system0");
            toggleSInsert               = Snap.UI.Block.Toggle.GetBlock(theDialog, "toggleSInsert");
            selectionSInsert            = Snap.UI.Block.SelectObject.GetBlock(theDialog, "selectionSInsert");
            toggleIsDistinguishSideElec = Snap.UI.Block.Toggle.GetBlock(theDialog, "toggleIsDistinguishSideElec");
            // private Snap.UI.Block.Enumeration enumSInsert;// Block type: Enumeration
            // private Snap.UI.Block.Integer integerSInsertLayer;// Block type: Integer

            enumSInsert         = Snap.UI.Block.Enumeration.GetBlock(theDialog, "enumSInsert");
            integerSInsertLayer = Snap.UI.Block.Integer.GetBlock(theDialog, "integerSInsertLayer");

            //         private Snap.UI.Block.Group groupElec;// Block type: Group
            //private Snap.UI.Block.SelectObject selectElec;// Block type: Selection
            selectElec = Snap.UI.Block.SelectObject.GetBlock(theDialog, "selectElec");
            groupElec  = Snap.UI.Block.Group.GetBlock(theDialog, "groupElec");

            groupElecLayer        = Snap.UI.Block.Group.GetBlock(theDialog, "groupElecLayer");
            integerElecStartLayer = Snap.UI.Block.Integer.GetBlock(theDialog, "integerElecStartLayer");
            integerElecEndLayer   = Snap.UI.Block.Integer.GetBlock(theDialog, "integerElecEndLayer");
        }
        catch (Exception ex)
        {
            //---- Enter your exception handling code here -----
            theUI.NXMessageBox.Show("Block Styler", NXMessageBox.DialogType.Error, ex.ToString());
        }
    }