proc updateTokenField { dongleId tokenField lastSelectedDongleField} {
set dongle [$dongleId getCurrentValue]
if {$dongle != [$lastSelectedDongleField getCurrentValue]} {
set buffer [GuidoExecServer getTokenForDongle [subst {dongle_id = "$dongle"}]]
set valid [ GuidoGetParamBufferValue $buffer "valid" ]
if {$valid == "true"} {
set token [ GuidoGetParamBufferValue $buffer "token_str" ]
$tokenField setCurrentValue $token
} else {
$tokenField setCurrentValue "0000000000000000"
}
$lastSelectedDongleField setCurrentValue $dongle
}
}
GuidoForm frmtoken {
-default_buttons
-label "Update Licence Token"
-layout BoxLayout Y_AXIS
GuidoPanel frmtoken_24 {
-layout BoxLayout X_AXIS
GuidoPanel frmtoken_21 {
-layout CentreLineLayout
GuidoField name {
-display_length 16
-format none
-input false
-label Product:
-max_length 16
-translate none
}
GuidoField exec_date {
-display_length 16
-format none
-input false
-label "Build Date:"
-max_length 40
-translate none
}
GuidoComboBox dongleIdCombo {
-display_length 16
-format none
-label "Dongle"
-max_length 16
-translate none
-null false
-exclusive true
}
}
GuidoFiller frmtoken_25 {
-width 1
}
GuidoField release {
-display_length 10
-format none
-input false
-label Release:
-max_length 10
-translate none
}
GuidoFiller frmtoken_25 {
-width 1
}
GuidoField type {
-display_length 10
-format none
-input false
-label Type:
-max_length 10
-translate none
}
GuidoFiller frmtoken_25 {
-width 1
}
}
GuidoFiller frmtoken_26 {
-height 1
}
GuidoPanel frmtoken_29 {
-layout BoxLayout X_AXIS
GuidoPanel frmtoken_27 {
-layout CentreLineLayout
GuidoField token {
-display_length 32
-format none
-label Token:
-max_length 40
-next_focus frmtoken_10
-tip token_TIP_0
-translate none
}
GuidoFiller frmtoken_30 {}
GuidoField validity {
-display_length 6
-font_style bold
-format none
-input false
-max_length 16
-translate none
}
GuidoField expires {
-display_length 16
-format none
-input false
-label Expires:
-max_length 16
-translate none
}
}
GuidoFiller frmtoken_31 {
-width 1
}
GuidoButton frmtoken_10 {
-caption Validate
-height 1
-legacy_button
-selected_value validate
-visible true
}
GuidoFiller frmtoken_31 {
-width 1
}
}
GuidoPanel frmtoken_34 {
-layout BoxLayout X_AXIS
GuidoField max_users {
-display_length 16
-format none
-input false
-label "Max Users:"
-max_length 16
-translate none
}
GuidoFiller frmtoken_35 {
-width 1
}
GuidoScrollPane scrollpane {
-height 16
GuidoTable table {
-instances 1 1 32
-interactive false
GuidoField option {
-display_length 15
-format none
-input false
-label Module
-max_length 15
-translate none
}
GuidoCheckBox enabled {
-default false
-input false
-label Enabled?
-selected_value Yes
-unselected_value No
}
}
}
GuidoFiller frmtoken_35 {
-width 1
}
}
GuidoField lastSelectedDongle {
-max_length 10
-null true
-display_length 10
-visible false
}
$dongleIdCombo setActionCallback valueChanged {[updateTokenField $dongleIdCombo $token $lastSelectedDongle]}
}
