// Copyright (C) 1997-2006 Autodesk, Inc., and/or its licensors. // All rights reserved. // // The coded instructions, statements, computer programs, and/or related // material (collectively the "Data") in these files contain unpublished // information proprietary to Autodesk, Inc. ("Autodesk") and/or its licensors, // which is protected by U.S. and Canadian federal copyright law and by // international treaties. // // The Data is provided for use exclusively by You. You have the right to use, // modify, and incorporate this Data into other products for purposes authorized // by the Autodesk software license agreement, without fee. // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND. AUTODESK // DOES NOT MAKE AND HEREBY DISCLAIMS ANY EXPRESS OR IMPLIED WARRANTIES // INCLUDING, BUT NOT LIMITED TO, THE WARRANTIES OF NON-INFRINGEMENT, // MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE, OR ARISING FROM A COURSE // OF DEALING, USAGE, OR TRADE PRACTICE. IN NO EVENT WILL AUTODESK AND/OR ITS // LICENSORS BE LIABLE FOR ANY LOST REVENUES, DATA, OR PROFITS, OR SPECIAL, // DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES, EVEN IF AUTODESK AND/OR ITS // LICENSORS HAS BEEN ADVISED OF THE POSSIBILITY OR PROBABILITY OF SUCH DAMAGES. // // licensees of Alias Systems. Such users have the right to use, modify, // by the Alias Systems license agreement, without fee. // // ALIAS SYSTEMS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, proc setOptionVars(int $forceFactorySettings) { if( $forceFactorySettings || !`optionVar -exists GB_HostName`){ optionVar -stringValue GB_HostName "localhost"; } // GB Port Number if( $forceFactorySettings || !`optionVar -exists GB_ServerPortNumber`){ optionVar -intValue GB_ServerPortNumber 63419; } } proc cancelGBPrefs() { deleteUI gbClientPrefsWindow; } proc resetDefaults( ) { setOptionVars(1); textFieldGrp -e -text `optionVar -q GB_HostName` gbHostName; intFieldGrp -e -v1 `optionVar -q GB_ServerPortNumber` gbPortNumber; } proc applyGBPrefs( ) { optionVar -intValue GB_ServerPortNumber `intFieldGrp -q -v1 gbPortNumber`; optionVar -stringValue GB_HostName `textFieldGrp -q -text gbHostName`; cancelGBPrefs(); } global proc showGBClientPrefs() { if (!`window -exists gbClientPrefsWindow`) { // Make sure the defaults exist. setOptionVars(0); // Build the window. window -title "Greenbox Client Preferences" gbClientPrefsWindow; setUITemplate -pushTemplate DefaultTemplate; tabLayout -scr true -tv false; string $parent = `columnLayout -adjustableColumn 1`; textFieldGrp -l "Host Name" gbHostName; intFieldGrp -l "Port Number" gbPortNumber; formLayout gbButtons; button -label "Apply And Close" -command applyGBPrefs gbApplyButton; button -label "Defaults" -command resetDefaults gbDefaultButton; button -label "Close" -command cancelGBPrefs gbCancelButton; formLayout -e -attachForm gbApplyButton "bottom" 5 -attachForm gbApplyButton "left" 5 -attachPosition gbApplyButton "right" 5 33 -attachForm gbDefaultButton "bottom" 5 -attachControl gbDefaultButton "left" 5 gbApplyButton -attachPosition gbDefaultButton "right" 5 66 -attachForm gbCancelButton "bottom" 5 -attachControl gbCancelButton "left" 5 gbDefaultButton -attachForm gbCancelButton "right" 5 gbButtons; setUITemplate -popTemplate; // Set the default values textFieldGrp -e -text `optionVar -q GB_HostName` gbHostName; intFieldGrp -e -v1 `optionVar -q GB_ServerPortNumber` gbPortNumber; showWindow; } }