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

📄 compslct.tcl

📁 vxworks下MV5500的BSP支持包。是支持tornad221下的版本。
💻 TCL
📖 第 1 页 / 共 5 页
字号:
    set i 0    foreach itemState \                [controlItemPropertyGet partListDlgHnd.optionList -checkstate] {        partInfoSet instFlag $objGuiMap(gui2part,$i) $itemState        incr i    }}############################################################################### partGuiUpdate - update the partListDlg GUI## This procedure will update the partListDlg GUI## SYNOPSIS# .tS# partGuiUpdate <guiPartIndex># .tE## PARAMETERS:# .IP guiPartIndex# the index of selected part## RETURNS: N/A## ERRORS: N/A#proc partGuiUpdate {guiPartIndex} {    partGuiChkLstUpdate $guiPartIndex    partGuiSizeUpdate}############################################################################### partGuiChkLstUpdate - update the partListDlg GUI## This procedure will update the partListDlg GUI## SYNOPSIS# .tS# partGuiChkLstUpdate <guiPartIndex># .tE## PARAMETERS:# .IP guiPartIndex# the index of selected part## RETURNS: N/A## ERRORS: N/A#proc partGuiChkLstUpdate {guiPartIndex} {    global objGuiMap    global ctrlVals    set prodIndex [currSelProdIndexGet]    if {"$prodIndex" == ""} {        windowClose partListDlgHnd        messageBox "Please select a product first"    } else {        set chkList {}        set i 0        foreach partIndex [productInfoGet partIndexList $prodIndex] {            set objGuiMap(gui2part,$i) $partIndex            set objGuiMap(part2gui,$partIndex) $i            set size [partInfoGet size $partIndex]            set formatMbSize [format "%7s MB" [byteToMbyte $size]]            set desc " [partInfoGet desc $partIndex]\t$formatMbSize "            lappend chkList [list $desc [partInfoGet instFlag $partIndex]]            incr i        }        controlValuesSet partListDlgHnd.optionList $chkList        controlFocusSet partListDlgHnd.optionList        controlSelectionSet partListDlgHnd.optionList -noevent $guiPartIndex    }}############################################################################### partGuiSizeUpdate - update the size of each product's part## This procedure will update the size of each product's part when user# selects/deselects a part## SYNOPSIS# .tS# partGuiSizeUpdate# .tE## PARAMETERS: N/A## RETURNS: N/A## ERRORS: N/A#proc partGuiSizeUpdate {} {    set totalSize [byteToMbyte [productInfoGet size [currSelProdIndexGet]]]    controlValuesSet partListDlgHnd.spaceRequireLabel \           "Space Required:  $totalSize MB"}############################################################################### onPartListDlgOk - callback when OK button is pushed and close partListDlg#                   dialog box and save changes## This procedure is a callback whne OK button is pushed and# close partListDlg dialog box and save changes## SYNOPSIS# .tS# onPartListDlgOk# .tE## PARAMETERS: N/A## RETURNS: N/A## ERRORS: N/A#proc onPartListDlgOk {} {    global objGuiMap ctrlVals    set prodIndex [currSelProdIndexGet]    windowClose partListDlgHnd    switch [productInfoGet stateInfo $prodIndex] {        changedIncr {            productInfoSet instFlag \                    [partInfoGet parent $objGuiMap(gui2part,0)] 1            set desc [productInfoGet desc $prodIndex]                        set hostType [hostVerGet]                        set prodHostType [prodHostTypeGet $desc]            if {[productInfoGet instFlag $prodIndex]} {                if {$hostType != $prodHostType && $prodHostType != "unknown"} {                    set msg "The product, $desc, is not meant for installation \                        on this host type of $hostType.\nContinuing with the \                        installation may lead to an incomplete installation \                        due to missing host tools."                    if { $ctrlVals(useInputScript) } {                        autoSetupLog "$msg"                        autoSetupLog "Please re-select the component\(s\)."                        autoSetupLog "Application Exit\n"                        set setupVals(cancel) 1                                        applicationExit                        return 0                    } else {                        dialog ok_with_title "WARNING: Product Installation" $msg                    }                }            }        }        changedToNone {            productInfoSet instFlag \                    [partInfoGet parent $objGuiMap(gui2part,0)] 0        }    }    productGuiChkLstUpdate [currSelProdIndexGet gui]    productInfoSet stateCommit [currSelProdIndexGet]    productInfoSet childStateCommit [currSelProdIndexGet]    productGuiSizeUpdate}############################################################################### onPartListDlgCancel - callback when cancel button is pushed and restore#                       the previous settings## This procedure## SYNOPSIS# .tS# onPartListDlgCancel# .tE## PARAMETERS: N/A## RETURNS: N/A## ERRORS: N/A#proc onPartListDlgCancel {} {    windowClose partListDlgHnd    productInfoSet childStateRestore [currSelProdIndexGet]}############################################################################### detailShow - enable detail button if the product has subparts## This procedure will enable detail button if the product has subparts## SYNOPSIS# .tS# detailShow# .tE## PARAMETERS: N/A## RETURNS: N/A## ERRORS: N/A#proc detailShow {} {    global productObj    global ctrlVals    set hasSubPart [expr [llength [productInfoGet partIndexList \                                                  [currSelProdIndexGet]]] > 1]    set numSubPart \        [llength [productInfoGet partIndexList [currSelProdIndexGet]]]    if {$hasSubPart} {        # add an indication of components/product selected        set nCompSel 0        set totComps 0        foreach partIndex $productObj([currSelProdIndexGet],partIndexList) {            if {"[partInfoGet instFlag $partIndex]" == "1"} {                incr nCompSel            }            incr totComps        }        if {[productInfoGet instFlag [currSelProdIndexGet]] == 1} {            controlValuesSet $ctrlVals(mainWindow).compSelected "There\               are $nCompSel out of $totComps components selected for\               [productInfoGet desc [currSelProdIndexGet]]."        } else {            controlValuesSet $ctrlVals(mainWindow).compSelected "There\               are 0 out of $totComps components selected for\               [productInfoGet desc [currSelProdIndexGet]]."        }        controlEnable $ctrlVals(mainWindow).partDetailButt 1    } else {       # This is a single part product        if {[productInfoGet instFlag [currSelProdIndexGet]] == 1} {            controlValuesSet $ctrlVals(mainWindow).compSelected "There\               are 1 out of 1 components selected for\               [productInfoGet desc [currSelProdIndexGet]]."        } else {            controlValuesSet $ctrlVals(mainWindow).compSelected "There\               are 0 out of 1 components selected for\               [productInfoGet desc [currSelProdIndexGet]]."        }        controlEnable $ctrlVals(mainWindow).partDetailButt 0    }    return $hasSubPart}############################################################################### drvIndexGet - return the driverObjects/Header product index if it exists#               on the CD.## This procedure will returns the driverObjects/Header product index# if it exists on the CD.## SYNOPSIS# .tS# drvIndexGet# .tE## PARAMETERS:# .IP currentProdIndex# the current product index being selected or deselected## RETURNS: Returns the index of the driverObjects product if the index of the#          driverObjec is same as that of the current selected product#          else returns -1## ERRORS: N/A#proc drvIndexGet {currProdIndex} {    global setupVals    if {$setupVals(drvIndex) == -1} {        return -1    }    foreach drvObj $setupVals(drvIndex) {        set index [lindex $drvObj 0]        if {$index == $currProdIndex} {            return $index        }    }    return -1}############################################################################### drvArchGet - return the driverObjects/Header product arch if it exists#              on the CD.## This procedure will return the driverObjects/Header product arch if it exists# on the CD.## SYNOPSIS# .tS# drvArchGet# .tE## PARAMETERS:# .IP currentProdIndex# the current product index being selected## RETURNS: Returns the arch of the driverObjects product if the index of the#          driverObjec is same as that of the current selected product#          else returns -1## ERRORS: N/A#proc drvArchGet {currProdIndex} {    global setupVals    if {$setupVals(drvIndex) == -1} {        return -1    }    foreach drvObj $setupVals(drvIndex) {        set index [lindex $drvObj 0]        if {$index == $currProdIndex} {            return [lindex $drvObj 1]        }    }    return -1}############################################################################### prodHostTypeGet - proc to return a host type string## SYNOPSIS# .tS# prodHostTypeGet# .tE## PARAMETERS: description#   Description in the format <prod name>: <host>[ x <arch>]#   e.g. Tornado Object: WindowsNT x ppc#   e.g  Wind Navigator: solaris ## RETURNS: the hos type (a string) if it exists, else "unknown"## ERRORS: N/A#proc prodHostTypeGet {desc} {            set prodHostType "unknown"                                                                          switch -regexp $desc {        ".*[W|w]indows.*" {set prodHostType x86-win32}        ".*x86-win32.*"   {set prodHostType x86-win32}        ".*[S|s]olaris.*"   {set prodHostType sun4-solaris2}        ".*sun4-solaris2.*" {set prodHostType sun4-solaris2}        ".*simsolaris.*"  {set prodHostType sun4-solaris2}        ".*Windows2000.*" {set prodHostType Windows2000}        ".*WindowsNT.*"   {set prodHostType WindowsNT}        ".*Windows95.*"   {set prodHostType Windows95}        ".*Windows98.*"   {set prodHostType Windows98}        ".*hp9700.*"      {set prodHostType parisc-hpux10}        ".*simhppa.*"     {set prodHostType parisc-hpux10}        ".*SIMHPPA.*"     {set prodHostType parisc-hpux10}        #"^x86-linux2"    {set prodHostType x86-linux2}        default           {set prodHostType unknown}    }    #dbgputs "prodHostTypeGet - prodHostType: $prodHostType"        return $prodHostType}############################################################################### onClickProdCheckList - callback procedure invoked when product is checked#                        on compSelect page## This procedure is a callback procedure invoked when product is checked# on compSelect page## SYNOPSIS# .tS# onClickProdCheckList# .tE## PARAMETERS: N/A## RETURNS: N/A## ERRORS: N/A#proc onClickProdCheckList {} {    global ctrlVals    global setupVals    currSelProdIndexSet [controlSelectionGet $ctrlVals(mainWindow).optionList]    set hasSubPart [detailShow]    set currProdIndex [currSelProdIndexGet]        if {[lindex [controlEventGet $ctrlVals(mainWindow).optionList] 0] == \        "chkchange"} {

⌨️ 快捷键说明

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