//AB/ Project CM About New //AB/ Object oIDE_Project is a Dialog_Project //AB/ Set Size to 208 450 //AB/ Set ProjectName to "CM About New" //AB/ Set ProjectFileName to "RDCAboutNew.dg" //AB/ Set GenerateFileName to "NONAME1" // Project Object Structure // oAboutDialog is a cRDSDbModalPanel // oClose_bn is a cBitmapButton // oUpdate_bn is a cBitmapButton // oBuyProduct_bn is a cBitmapButton // oWebSite_bn is a cBitmapButton // oNewsGroup_bn is a cBitmapButton // oActivate_bn is a cBitmapButton // oSysInfo_bn is a cBitmapButton // oBox is a cRDSContainer3d // oAboutGraphic is a cRDSBitmapContainer // oAboutEdit is a cRDSEdit // Register all objects Register_Object oAboutDialog Register_Object oAboutEdit Register_Object oAboutGraphic Register_Object oActivate_bn Register_Object oBox Register_Object oBuyProduct_bn Register_Object oClose_bn Register_Object oNewsGroup_bn Register_Object oSysInfo_bn Register_Object oUpdate_bn Register_Object oWebSite_bn //AB-StoreTopStart // COPYRIGHT (c) 2003-2006 RDC Tools International // // This program is free software; you can redistribute it and/or // modify it under the terms of the GNU General Public License // as published by the Free Software Foundation; version 2 // of the License. // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // You should have received a copy of the GNU General Public License // along with this program; (See the GPL.txt file in the Help directory) if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. Use LanguageText.pkg Use DfBitmap.Pkg //Use cRdcLicence.pkg // SOUP component class Use ShellExecute.pkg //Use CrossMergeLicenseServer.h // Header file with define statements //Use cGetSetVersionNumber.pkg // Class for getting version number. Use SysInfoDialogNew.Dg //Use NagScreen.dg //AB-StoreTopEnd //AB-IgnoreStart Use cRDSDbModalPanel.pkg Use cBitmapButton.pkg Use cRDSContainer3d.pkg Use cRDSBitmapContainer.pkg Use cRDSEdit.pkg //AB-IgnoreEnd Object oAboutDialog is a cRDSDbModalPanel Set Label to "About CrossMerge" Set Locate_Mode to Center_On_Screen Set Location to 1 1 Set Size to 209 438 Set piMinSize to 185 438 //AB-DDOStart //AB-DDOEnd Object oClose_bn is a cBitmapButton Set Label to "&Close" Set Size to 14 60 Set Location to 150 371 Set Status_Help to "Close this panel" Set peAnchors to anBottomRight Set Default_State to TRUE Set Bitmap to "Cancel16.bmp" Set piTransparentColor to clFuchsia //AB-StoreStart Procedure OnClick Send Close_Panel End_Procedure // OnClick //AB-StoreEnd End_Object // oClose_bn Object oUpdate_bn is a cBitmapButton Set Label to "&Update" Set Size to 14 60 Set Location to 5 371 Set Status_Help to "Check if there is a later version of CrossMerge available. You need to have Internet confgured for the machine." Set peAnchors to anTopRight Set Bitmap to "UpDate16.bmp" Set Enabled_State to FALSE Set piTransparentColor to clFuchsia //AB-StoreStart Procedure OnClick String sRetval Integer iRetval // Get YesNo_Box "You need to have a working Internet connection on your machine to be able to check if a more recent version of CrossMerge is available. Continue?" To iRetval // If (iRetval = MBR_No) Procedure_Return // Send DoCheckUpdate End_Procedure // OnClick Function CrossMergeVersionInfo Returns String Integer hoVersionInfo iVersionMajor iVersionMinor iVersionRelease iVersionBuild Boolean bIncluded If (ghoApplication <> 0) Begin Get phoVersionInfo Of ghoApplication To hoVersionInfo If (hoVersionInfo <> 0) Begin Get pbIncluded Of hoVersionInfo To bIncluded If (bIncluded) Begin Get piVersionMajor Of hoVersionInfo To iVersionMajor Get piVersionMinor Of hoVersionInfo To iVersionMinor Get piVersionRelease Of hoVersionInfo To iVersionRelease Get piVersionBuild Of hoVersionInfo To iVersionBuild Function_Return (SFormat("%1.%2.%3.%4", iVersionMajor, iVersionMinor, iVersionRelease, iVersionBuild)) End // If (bIncluded) Begin End // If (hoVersionInfo <> 0) Begin End // If (ghoApplication <> 0) Begin End_Procedure // CrossMergeVersionInfo Procedure DoCheckUpdate // String sCustomerVersion sVersion sUser sPWord sOk sError sHeaderText sMessageText // Integer iType iCustomerVersion iVersion iCustomerBuild iBuild iPos iRetval iGetSet iError // Handle ho // Send Cursor_Wait Of Cursor_Control // Send StartWorkingMessage "Retrieving version information from WEB-service..." // Get CrossMergeVersionInfo To sCustomerVersion // Move 0 To iGetSet // Move "" To sVersion // Get Create U_cGetSetVersionNumber To ho // Send DoGetSetVersionNumber Of ho iGetSet sVersion // Get piError Of ho To iError // Get psError Of ho To sError // Get psHeaderText Of ho To sHeaderText // Get psMessageText Of ho To sMessageText // Send Destroy Of ho // Send Cursor_Ready Of Cursor_Control // Send StopWorkingMessage // If (iError <> CM_Err_Ok) Begin // Send Info_Box (String(sError)) // Procedure_Return // End // If (iError <> CM_Err_Ok) Begin // Move sError To sVersion // If (sCustomerVersion >= sVersion) Begin // Send Info_Box "You have the latest version of CrossMerge." // Procedure_Return // End // Else Begin // Move MBR_No To iRetval // // Remove the first two "." in the version: // Move (Replace(".", sCustomerVersion, "")) To sCustomerVersion // Move (Replace(".", sCustomerVersion, "")) To sCustomerVersion // Move (Replace(".", sVersion, "")) To sVersion // Move (Replace(".", sVersion, "")) To sVersion // Move (Pos(".", sCustomerVersion)) To iPos // Move (Left(sCustomerVersion, (iPos - 1))) To iCustomerVersion // Move (Mid(sCustomerVersion, 10, (iPos + 1))) To iCustomerBuild // Move (Pos(".", sVersion)) To iPos // Move (Left(sVersion, (iPos - 1))) To iVersion // Move (Mid(sVersion, 10, (iPos + 1))) To iBuild // If (iVersion > iCustomerVersion) ; // Get YesNo_Box "There is a later version of CrossMerge available. Do you want to download it now?" ; // sHeaderText To iRetval // Else If (iBuild > iCustomerBuild) ; // Get YesNo_Box "There is a later build of CrossMerge available. A new build usually means bugs that has been fixed, but there are no new features added. Do you want to download it now?" ; // sHeaderText To iRetval // If (iRetval = MBR_No) Procedure_Return // Send DoStartDocument "open" (String(CMLS_CrossMerge_Host) + String(CMLS_Dowload_Path_Version3)) "" "" // End // Else Begin End_Procedure // DoCheckUpdate //AB-StoreEnd End_Object // oUpdate_bn Object oBuyProduct_bn is a cBitmapButton Set Label to "&Buy Product" Set Size to 14 60 Set Location to 21 371 Set Status_Help to "Display a list of CrossMerge distributors in your web-browser. You need to have Internet confgured for the machine." Set peAnchors to anTopRight Set Bitmap to "InetSearch16.bmp" Set Enabled_State to FALSE Set piTransparentColor to clFuchsia //AB-StoreStart Procedure OnClick // Send DoStartDocument "open" (String(CMLS_CrossMerge_Host) + String(CMLS_Server_Host_Partners)) "" "" End_Procedure // OnClick //AB-StoreEnd End_Object // oBuyProduct_bn Object oWebSite_bn is a cBitmapButton Set Label to "&Web Site" Set Size to 14 60 Set Location to 37 371 Set Status_Help to "Open www.Crossmerge.com in your web-browser. You need to have Internet confgured for the machine." Set peAnchors to anTopRight Set Bitmap to "WebClient16.bmp" Set Enabled_State to FALSE Set piTransparentColor to clFuchsia //AB-StoreStart Procedure OnClick // Send DoStartDocument "open" CMLS_CrossMerge_Host "" "" End_Procedure // OnClick //AB-StoreEnd End_Object // oWebSite_bn Object oNewsGroup_bn is a cBitmapButton Set Label to "&Newsgroup" Set Size to 14 60 Set Location to 53 371 Set Status_Help to "Go to Crossmerge's newsgroup with the newsgroup reader configured for this machine. Support and a welth of information at your fingertips. You need to have Internet confgured for the machine." Set peAnchors to anTopRight Set Bitmap to "NewsGroups16.bmp" Set Enabled_State to FALSE Set piTransparentColor to clFuchsia //AB-StoreStart Procedure OnClick // Send DoStartDocument "open" CM_NewsGroup "" "" End_Procedure // OnClick //AB-StoreEnd End_Object // oNewsGroup_bn Object oActivate_bn is a cBitmapButton Set Label to "&Activation" Set Size to 14 60 Set Location to 69 371 Set Status_Help to "Activate your license online. Only available if the license type is Desktop or Consultant and the license has not yet been activated." Set peAnchors to anTopRight Set Bitmap to "Activate16.bmp" Set Enabled_State to FALSE Set piTransparentColor to clFuchsia //AB-StoreStart Procedure OnClick // Boolean bActivated // Send DoPopupNagScreen False // Get pbActivated Of ghoApplication To bActivated // Set Enabled_State To (Not(bActivated)) End_Procedure // OnClick //AB-StoreEnd End_Object // oActivate_bn Object oSysInfo_bn is a cBitmapButton Set Label to "System &Info" Set Size to 14 60 Set Location to 134 371 Set Status_Help to "Display system information about software and hardware." Set peAnchors to anBottomRight Set Bitmap to "Help16x16.bmp" Set piTransparentColor to clFuchsia //AB-StoreStart Procedure OnClick Send Popup_Modal Of oSystemInformationDialog End_Procedure // OnClick //AB-StoreEnd End_Object // oSysInfo_bn Object oBox is a cRDSContainer3d //AB-StoreTopStart Function CrossMergeVersionInfo Returns String Integer hoVersionInfo iVersionMajor iVersionMinor iVersionRelease iVersionBuild Boolean bIncluded If (ghoApplication <> 0) Begin Get phoVersionInfo Of ghoApplication To hoVersionInfo If (hoVersionInfo <> 0) Begin Get pbIncluded Of hoVersionInfo To bIncluded If (bIncluded) Begin Get piVersionMajor Of hoVersionInfo To iVersionMajor Get piVersionMinor Of hoVersionInfo To iVersionMinor Get piVersionRelease Of hoVersionInfo To iVersionRelease Get piVersionBuild Of hoVersionInfo To iVersionBuild Function_Return ((SFormat(C_$VERSION + ": %1.%2.%3.", iVersionMajor, iVersionMinor, iVersionRelease)) * "Build No: " + String(iVersionBuild)) End End End End_Procedure // CrossMergeVersionInfo Procedure AddLine String sVal Handle ho Integer iLine Move (oAboutEdit(Self)) To ho Move (Line_Count(ho)) To iLine Set Value Of ho Item iLine To sVal End_Procedure // Add_Line Procedure ReadInfoFile String sFileName String sHelpPath Get psHelpPath Of (phoWorkspace(ghoApplication)) To sHelpPath Direct_Input sFilename If Not (Seqeof) Begin Close_Input Send Read Of oAboutEdit sFilename End End_Procedure // ReadInfoFile //AB-StoreTopEnd Set Size to 173 363 Set Location to 5 5 Set Color to clWindow Set peAnchors to anAll Set Border_Style to Border_ClientEdge Object oAboutGraphic is a cRDSBitmapContainer Set Size to 39 48 Set Location to 4 2 Set Color to clWindow Set Bitmap to "Cm48x48.bmp/t3d" Set Border_Style to Border_None Set Bitmap_Style to Bitmap_Center //AB-StoreStart Set Status_Help To "Information about this program" Set psToolTipTitle To (Label(oAboutDialog(Self))) Set psToolTip To "Information about this program" //AB-StoreEnd End_Object // oAboutGraphic Object oAboutEdit is a cRDSEdit Set Size to 167 310 Set Location to 0 51 Set Status_Help to "Information about this program" Set peAnchors to anAll Set Border_Style to Border_None //AB-StoreStart Set Read_Only_State To True Set psToolTipTitle To (Label(oAboutDialog(Self))) Set psToolTip To "Information about this program" //On_Key Key_F6 Send Switch On_Key kSwitch Send Switch Procedure Switch Move 0 To windowindex End_Procedure Procedure Switch_Next_Group End_Procedure Procedure Switch_Next_Scope End_Procedure Function Next_Object_Id Integer iState Returns Integer End_Function // Next_Object_Id Function Next_Object_Id Returns Integer End_Function // Next_Object_Id //AB-StoreEnd End_Object // oAboutEdit //AB-StoreStart Set Status_Help To "Information about this program" Set psToolTipTitle To (Label(oAboutDialog(Self))) Set psToolTip To "Information about this program" Procedure DoUpdateAbout String sVersion Integer iVersionMajor iVersionMinor iVersionRelease Version_Information iVersionMajor iVersionMinor iVersionRelease Send AddLine "" Send AddLine (psProduct(ghoApplication) * psProgram(ghoApplication) * "-" * psLicenseType(ghoApplication) * psActivationDaysText(ghoApplication)) Send AddLine "" Get CrossMergeVersionInfo To sVersion Send AddLine sVersion Send AddLine "Copyright 2001-2006 RDC Tools International. Portions Copyright Data Access Worldwide." //Send AddLine "E-mail: support@crossmerge.com" //Send AddLine ("Support:" * CM_NewsGroup) Send AddLine "" // Send AddLine ("Licensed to:" * psName(ghoApplication)) // Send AddLine ("Serial no:" * String(psSerial(ghoApplication))) // Send AddLine ("Licensed users:" * String(piUsers(ghoApplication))) Send AddLine "" Send AddLine "'CrossMerge', 'CrossMerge Builder' and 'CrossMerge Engine' are trademarks of RDC Tools International" Send AddLine "" Send AddLine ("This tool was created with Visual DataFlex" * String(iVersionMajor) + "." + String(iVersionMinor) * "from Data Access Worldwide. Visit www.dataaccess.com for a free evaluation copy of Visual DataFlex.") Send AddLine "" Send ReadInfoFile "GPL.txt" End_Procedure // DoUpdateAbout //AB-StoreEnd End_Object // oBox //AB-StoreStart // Tell the object what to do if the following keys are pressed. On_Key Key_Alt+Key_U Send KeyAction Of oUpdate_bn On_Key Key_Alt+Key_B Send KeyAction Of oBuyProduct_bn On_Key Key_Alt+Key_W Send KeyAction Of oWebSite_bn On_Key Key_Alt+Key_N Send KeyAction Of oNewsGroup_bn On_Key Key_Alt+Key_A Send KeyAction Of oActivate_bn On_Key kCancel Send KeyAction Of oClose_bn On_Key Key_Alt+Key_C Send KeyAction Of oClose_bn On_Key Key_Alt+Key_I Send KeyAction Of oSysInfo_bn Function Next_Object_Id Integer iState Returns Integer End_Function // Next_Object_Id Function Next_Object_Id Returns Integer End_Function // Next_Object_Id Procedure Switch End_Procedure Procedure Switch_Next_Group End_Procedure Procedure Switch_Next_Scope End_Procedure //AB-StoreEnd End_Object // oAboutDialog //AB-StoreStart // Send by the main program after the view has been activated. // Must be in this order because it is then the Protection Plus // logic is activated and info is displayed in this dialog. Procedure DoUpdateAbout Handle ho Integer iLicenseType Boolean bActivated Move (oBox(oAboutDialog(Self))) To ho Send DoUpdateAbout Of ho // Move (True) To bActivated // Get piLicenseType Of ghoApplication To iLicenseType // If (iLicenseType = CM_Desktop Or iLicenseType = CM_Consultant) ; // Get pbActivated Of ghoApplication To bActivated // Set Enabled_State Of (oActivate_bn(oAboutDialog(Self))) To (Not(bActivated)) End_Procedure // DoUpdateAbout //Procedure OnStartup // Handle ho // Integer iLicenseType iSize // Boolean bActivated // Move (oAboutDialog(Self)) To ho // Move (False) To bActivated // Get piLicenseType Of ghoApplication To iLicenseType // If (iLicenseType = CM_Desktop Or iLicenseType = CM_Consultant) ; // Get pbActivated Of ghoApplication To bActivated // If (bActivated = False) Begin // Send Destroy Of (oActivate_bn(ho)) // Get Size Of ho To iSize // Set Size Of ho To (Hi(iSize)) (Low(iSize)) // End // If (bActivated = False) Begin //End_Procedure // OnStartup //Send OnStartup //AB-StoreEnd //AB/ End_Object // oIDE_Project