⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 licmanual.tcl

📁 VxWorks的开发平台Tornado2.2升级到2.2.1的补丁。
💻 TCL
📖 第 1 页 / 共 3 页
字号:
# A callout is made to update the license request values and update# the table display.## SYNOPSIS# .tS# floatTextManualCB# .tE## PARAMETERS: N/A## RETURNS: N/A## ERRORS: N/A##proc floatTextManualCB {} {    global ctrlVals    set ix [controlSelectionGet $ctrlVals(mainWindow).licManualTable]    # if the user is making selections in the table, simply     # return so that the text callback does not automatically    # update the table at the same time.    if {$ctrlVals(tableUpdate) == 1} {        return    }    # set the inputUpdate variable to 1 so that the table    # callback does not automatically update the text    # entry box at the same time.    set ctrlVals(inputUpdate) 1        manualLicRequestedUpdate $ix    set ctrlVals(inputUpdate) 0}proc nodelockChoiceManualCB {} {    global ctrlVals    set ix [controlSelectionGet $ctrlVals(mainWindow).licManualTable]    # if the user is making selections in the table, simply     # return so that the text callback does not automatically    # update the table at the same time.    if {$ctrlVals(tableUpdate) == 1} {        return    }    # set the inputUpdate variable to 1 so that the table    # callback does not automatically update the radio    # choices at the same time.    set ctrlVals(inputUpdate) 1        manualNodelockChoiceCB $ix    set ctrlVals(inputUpdate) 0}############################################################################### licTableManualUpdate - updates manual floating license table with specified #                        values## This procedure updates the floating license table for the specified# feature and number of licenses requested.  This is called when the# user updates the number of requsted licenses in the text entry box.## SYNOPSIS# .tS# licTableManualUpdate# .tE## PARAMETERS: #     featIx - feature index, corresponding to the selection in the table#     numRequested - number of requested licenses## RETURNS: N/A## ERRORS: N/A##proc licTableManualUpdate {featIx numRequested} {    global lmVals ctrlVals setupVals    set length [llength $lmVals(lmLicensedProductNames)]    for {set ix 0} {$ix < $length} {incr ix} {        # get all the values for the current feature        set featureVals [lindex [controlValuesGet $ctrlVals(mainWindow).licManualTable] $ix]           if { $ix == $featIx } {            # then get just the first two values, the third value (requested)            # will be set here                    set featureVals [lrange $featureVals 0 1]            if {$setupVals(lmInstType) == "floating"} {                lappend featureVals $numRequested            } else {                # node locked                if {$numRequested == 1} {                    lappend featureVals "Yes"                } else {                    lappend featureVals "No"                }            }        }         lappend licTableVals $featureVals             }     controlFocusSet $ctrlVals(mainWindow).licManualTable      controlValuesSet $ctrlVals(mainWindow).licManualTable $licTableVals                controlSelectionSet $ctrlVals(mainWindow).licManualTable $featIx               if {$ctrlVals(inputUpdate) == 1} {        # if the user is updating the text entry box, put focus        # back on the entry box        if {$setupVals(lmInstType) == "floating"} {            controlFocusSet $ctrlVals(mainWindow).textManualRequested        }    }            }############################################################################### manualLicRequestedUpdate ## This procedure does the work for the manual license text box callback# procedures.  It updates the temporary array to be displayed on the # Email or Phone/Fax License Request Summary page and controls# enabling or disabling of the Next button.## SYNOPSIS# .tS# manualRequestedUpdate ix# .tE## PARAMETERS: N/A# ix - the index or order in which the licensed product is displayed## RETURNS: n/a## ERRORS: N/A#proc manualLicRequestedUpdate {ix} {    global ctrlVals lmVals setupVals    if { [isGUImode] } {        if { $setupVals(lmInstType) == "floating" } {            if {[controlValuesGet wizardDialog.textManualRequested] != ""} {                set input [controlValuesGet wizardDialog.textManualRequested]                if {[isNumeric $input "License Count Input Error" wizardDialog.textManualRequested]} {                    #update licensed product(s) information                    set lmVals(lmFeaturesRequested) \                            [lreplace $lmVals(lmFeaturesRequested) $ix $ix $input]                    licTableManualUpdate $ix $input                }            }        } else {            if {[controlValuesGet wizardDialog.${ix}Requested] != ""} {                set input [controlValuesGet wizardDialog.${ix}Requested]                if {[isNumeric $input "License Count Input Error" wizardDialog.${ix}Requested]} {                    #update licensed product(s) information                    set lmVals(lmFeaturesRequested) \                        [lreplace $lmVals(lmFeaturesRequested) $ix $ix $input]                }            } else {                 set lmVals(lmFeaturesRequested) \                    [lreplace $lmVals(lmFeaturesRequested) $ix $ix 0]            }        }                if { [checkLMFeaturesRequestedFields] } {            controlEnable wizardDialog.nextButt 1        } else {            controlEnable wizardDialog.nextButt 0        }    } else { # TEXT mode        set name [lindex $lmVals(lmLicensedProductNames) $ix]        puts "Enter the number of licenses to be requested for $name product."        set ret [prompt]        switch -regexp -- $ret {            "^-$" {                pageCreate(licManual)            }            "[ ]+" {                puts "Error: Invalid input."                while {[prompt "Press <Enter> to continue."] != "" } {                }                pageCreate(licManual)            }            "^[0-9]+" {                 set lmVals(lmFeaturesRequested) \                        [lreplace $lmVals(lmFeaturesRequested) $ix $ix $ret]            }            "[eE][xX][iI][tT]" {                  return 0              }            default {                puts "Error: Invalid input."                while {[prompt "Press <Enter> to continue."] != "" } {                }                pageCreate(licManual)            }        }    }}############################################################################### manualNodelockChoiceCB## This procedure does the work for the node locked license check box # callback procedures.  It updates the temporary array to be displayed on# the Email or Phone/Fax License Request Summary page## SYNOPSIS# .tS# manualNodelockChoiceCB ix# .tE## PARAMETERS: N/A# ix - the index or order in which the licensed product is displayed## RETURNS: n/a## ERRORS: N/A#proc manualNodelockChoiceCB {ix} {    global ctrlVals lmVals setupVals    if { [isGUImode] } {        if {[controlChecked wizardDialog.yesManualChoice] == 1} {            #update licensed product(s) information            set lmVals(lmFeaturesRequested) \                    [lreplace $lmVals(lmFeaturesRequested) $ix $ix 1]        } else {            set lmVals(lmFeaturesRequested) \                    [lreplace $lmVals(lmFeaturesRequested) $ix $ix 0]        }        licTableManualUpdate $ix [controlChecked wizardDialog.yesManualChoice]        if { [checkLMFeaturesRequestedFields] } {            controlEnable wizardDialog.nextButt 1        } else {            controlEnable wizardDialog.nextButt 0        }    } else { # TEXT mode        set oldValue [lindex $lmVals(lmFeaturesRequested) $ix]                if { $oldValue == 1 } {            set lmVals(lmFeaturesRequested) \                    [lreplace $lmVals(lmFeaturesRequested) $ix $ix 0]        } else {            set lmVals(lmFeaturesRequested) \                    [lreplace $lmVals(lmFeaturesRequested) $ix $ix 1]        }    }}####################################################################### Dialog Text Messages######################################################################set strTable(LICMANUAL_TITLE_EMAIL) "Email License Configuration"set strTable(LICMANUAL_TITLE_PHONE) "Phone/Fax License Configuration"set strTable(LICMANUAL_MSG_COMMON) \    "Please refer to the Sales Acknowledgement Agreement for \     the number of licenses available for the installed product(s)."set strTable(LICMANUAL_UPDATE1) \	"Please enter the number of licenses to be requested for\     this host for all the installed product(s) listed below. \     [strTableGet LICMANUAL_MSG_COMMON]"set  strTable(LICMANUAL_TEXT) \    "Enter the item number for the products for which you\     would like to request a license or press \<Return\> to\     accept this configuration."set strTable(LICMANUAL_UPDATE2) \	"After configuring floating licenses, click <Next> to continue."set strTable(LICMANUAL_ELM_UPDATE2) \	"After configuring licenses, click <Next> to continue."set strTable(LICMANUAL_NODELOCK1) \	"Please select the node locked licenses desired for this host from\	the following list of installed product(s):"set  strTable(LICMANUAL_NODELOCK2) \	"After configuring node locked licenses, click <Next> to continue."set strTable(LICMANUAL_ZERO_ERROR) \    "You must enter a non-zero value for at least one product."set strTable(LICMANUAL_TABLE_FLOATING) \        "Select a product in the table above, then enter the number of\        licenses to be allocated."set strTable(LICMANUAL_TABLE_NODELOCKED) \        "Select a product above, then specify whether to\        request a node locked license."set strTable(LICMANUAL_COL1) "Licensed Product"set strTable(LICMANUAL_COL2) "Feature ID"set strTable(LICMANUAL_COL3) "No. of licenses\nto be allocated"set strTable(LICMANUAL_NODELOCK) "Request a node\nlocked license"

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -