set permit_db_method "Y"
proc initialize { frm12000 hack selav selslope seldb bearing oredip bearing_err oredip_err sloloc slrange} {
if {[$frm12000 readInputField selav] == "Y"} {
$hack setCurrentValue "Average"
$bearing setCurrentValue [$frm12000 readInputField bearing]
$oredip setCurrentValue [$frm12000 readInputField oredip]
$bearing_err setCurrentValue [$frm12000 readInputField bearing_err]
$oredip_err setCurrentValue [$frm12000 readInputField oredip_err]
}
if {[$frm12000 readInputField selslope] == "Y"} {
$hack setCurrentValue "Slope Files"
$sloloc setCurrentValue [$frm12000 readInputField sloloc]
$slrange setCurrentValue [$frm12000 readInputField slrange]
}
if {[$frm12000 readInputField seldb] == "Y"} {
$hack setCurrentValue "Database"
}
set db_method [$frm12000 readInputField permit_db_method]
if {"$db_method" == "Y"} {
$seldb setVisible true
} else {
$seldb setVisible false
}
}
proc finish { frm12000 hack selav selslope seldb bearing oredip bearing_err oredip_err sloloc slrange } {
if {[$hack getCurrentValue] == "Average"} {
$frm12000 writeOutputField selav "Y"
$frm12000 writeOutputField bearing [$bearing getCurrentValue]
$frm12000 writeOutputField oredip [$oredip getCurrentValue]
$frm12000 writeOutputField bearing_err [$bearing_err getCurrentValue]
$frm12000 writeOutputField oredip_err [$oredip_err getCurrentValue]
$frm12000 writeOutputField selslope "N"
$frm12000 writeOutputField seldb "N"
}
if {[$hack getCurrentValue] == "Slope Files"} {
$frm12000 writeOutputField selslope "Y"
$frm12000 writeOutputField sloloc [$sloloc getCurrentValue]
$frm12000 writeOutputField slrange [$slrange getCurrentValue]
$frm12000 writeOutputField selav "N"
$frm12000 writeOutputField seldb "N"
}
if {[$hack getCurrentValue] == "Database"} {
$frm12000 writeOutputField seldb "Y"
$frm12000 writeOutputField selslope "N"
$frm12000 writeOutputField selav "N"
}
$frm12000 finishedWritingFields
}
GuidoForm frm12000 {
-action initial {[initialize $frm12000 $hack $selav $selslope $seldb $bearing $oredip $bearing_err $oredip_err $sloloc $slrange]}
-action stateChanged {[ finish $frm12000 $hack $selav $selslope $seldb $bearing $oredip $bearing_err $oredip_err $sloloc $slrange]}
-default_buttons
-label "Calculate True Thickness"
-layout BoxLayout Y_AXIS
-tip "12000_TIP_001"
GuidoPanel choices_panel {
-layout CentreLineLayout
GuidoLabel label {
-label "Calculate True Thickness"
-height 1
}
GuidoPanel frm12000_15 {
-layout BoxLayout Y_AXIS
GuidoFiller filler_width_1 {
-width 1
}
GuidoButtonGroupPanel hack {
-layout BoxLayout Y_AXIS
GuidoRadioButton selav {
-caption "By average dip and dip direction"
-selected_value "Average"
-tip "12000_TIP_002"
}
GuidoRadioButton selslope {
-caption "From slope Files"
-selected_value "Slope Files"
-tip "12000_TIP_003"
}
GuidoRadioButton seldb {
-caption "From database fields"
-selected_value "Database"
-tip "12000_TIP_004"
}
}
}
}
GuidoPanel frm12000_18 {
-layout OverlayLayout
GuidoPanel dip_dip_direction_panel {
-border etched true
-dependency {"[ $selav getCurrentValue]" == "Average"}
-layout BoxLayout X_AXIS
GuidoPanel frm12000_16 {
-layout CentreLineLayout
GuidoField bearing {
-dependency {"[ $selav getCurrentValue]" == "Average"}
-display_length 6
-format double
-high_bound 360.000000
-label "Bearing of orebody dip"
-low_bound 0.000000
-max_length 6
-next_focus bearing_err
-null false
-tip "12000_TIP_005"
-translate upper
}
GuidoField oredip {
-dependency {"[ $selav getCurrentValue]" == "Average"}
-display_length 6
-format double
-high_bound 90.000000
-label "Dip of orebody"
-low_bound -90.000000
-max_length 6
-next_focus oredip_err
-null false
-tip "12000_TIP_005"
-translate upper
}
}
GuidoFiller filler_width_1 {
-width 1
}
GuidoPanel frm12000_17 {
-layout CentreLineLayout
GuidoField bearing_err {
-dependency {"[ $selav getCurrentValue]" == "Average"}
-display_length 3
-format double
-high_bound 360.000000
-label "and error"
-low_bound 0.000000
-max_length 3
-next_focus oredip
-null false
-tip "12000_TIP_007"
-translate upper
}
GuidoField oredip_err {
-dependency {"[ $selav getCurrentValue]" == "Average"}
-display_length 3
-format double
-high_bound 360.000000
-label "and error"
-low_bound 0.000000
-max_length 3
-null false
-tip "12000_TIP_007"
-translate upper
}
}
}
GuidoPanel frm12000_23 {
-dependency {"[ $selslope getCurrentValue]" == "Slope Files"}
-layout CentreLineLayout
GuidoFileBrowserField sloloc {
-dependency {"[ $selslope getCurrentValue]" == "Slope Files"}
-display_length 26
-file_mask *.str
-format none
-label Location
-link slrange
-max_length 252
-tip "12000_TIP_009"
-translate lower
}
GuidoField slrange {
-dependency {"[ $selslope getCurrentValue]" == "Slope Files"}
-display_length 26
-format range
-label "Id range"
-max_length 32
-null false
-tip "12000_TIP_009"
-translate none
}
}
}
$frm12000 legacyProcessValues false
}
