00001 // $Id: helpdownloadwebdialog.cpp 751 2006-03-31 15:43:49Z alex $ 00002 // HelpDownloadWebDialog.cpp : implementation file 00003 // 00004 /* @@tag:xara-cn@@ DO NOT MODIFY THIS LINE 00005 ================================XARAHEADERSTART=========================== 00006 00007 Xara LX, a vector drawing and manipulation program. 00008 Copyright (C) 1993-2006 Xara Group Ltd. 00009 Copyright on certain contributions may be held in joint with their 00010 respective authors. See AUTHORS file for details. 00011 00012 LICENSE TO USE AND MODIFY SOFTWARE 00013 ---------------------------------- 00014 00015 This file is part of Xara LX. 00016 00017 Xara LX is free software; you can redistribute it and/or modify it 00018 under the terms of the GNU General Public License version 2 as published 00019 by the Free Software Foundation. 00020 00021 Xara LX and its component source files are distributed in the hope 00022 that it will be useful, but WITHOUT ANY WARRANTY; without even the 00023 implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 00024 See the GNU General Public License for more details. 00025 00026 You should have received a copy of the GNU General Public License along 00027 with Xara LX (see the file GPL in the root directory of the 00028 distribution); if not, write to the Free Software Foundation, Inc., 51 00029 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 00030 00031 00032 ADDITIONAL RIGHTS 00033 ----------------- 00034 00035 Conditional upon your continuing compliance with the GNU General Public 00036 License described above, Xara Group Ltd grants to you certain additional 00037 rights. 00038 00039 The additional rights are to use, modify, and distribute the software 00040 together with the wxWidgets library, the wxXtra library, and the "CDraw" 00041 library and any other such library that any version of Xara LX relased 00042 by Xara Group Ltd requires in order to compile and execute, including 00043 the static linking of that library to XaraLX. In the case of the 00044 "CDraw" library, you may satisfy obligation under the GNU General Public 00045 License to provide source code by providing a binary copy of the library 00046 concerned and a copy of the license accompanying it. 00047 00048 Nothing in this section restricts any of the rights you have under 00049 the GNU General Public License. 00050 00051 00052 SCOPE OF LICENSE 00053 ---------------- 00054 00055 This license applies to this program (XaraLX) and its constituent source 00056 files only, and does not necessarily apply to other Xara products which may 00057 in part share the same code base, and are subject to their own licensing 00058 terms. 00059 00060 This license does not apply to files in the wxXtra directory, which 00061 are built into a separate library, and are subject to the wxWindows 00062 license contained within that directory in the file "WXXTRA-LICENSE". 00063 00064 This license does not apply to the binary libraries (if any) within 00065 the "libs" directory, which are subject to a separate license contained 00066 within that directory in the file "LIBS-LICENSE". 00067 00068 00069 ARRANGEMENTS FOR CONTRIBUTION OF MODIFICATIONS 00070 ---------------------------------------------- 00071 00072 Subject to the terms of the GNU Public License (see above), you are 00073 free to do whatever you like with your modifications. However, you may 00074 (at your option) wish contribute them to Xara's source tree. You can 00075 find details of how to do this at: 00076 http://www.xaraxtreme.org/developers/ 00077 00078 Prior to contributing your modifications, you will need to complete our 00079 contributor agreement. This can be found at: 00080 http://www.xaraxtreme.org/developers/contribute/ 00081 00082 Please note that Xara will not accept modifications which modify any of 00083 the text between the start and end of this header (marked 00084 XARAHEADERSTART and XARAHEADEREND). 00085 00086 00087 MARKS 00088 ----- 00089 00090 Xara, Xara LX, Xara X, Xara X/Xtreme, Xara Xtreme, the Xtreme and Xara 00091 designs are registered or unregistered trademarks, design-marks, and/or 00092 service marks of Xara Group Ltd. All rights in these marks are reserved. 00093 00094 00095 Xara Group Ltd, Gaddesden Place, Hemel Hempstead, HP2 6EX, UK. 00096 http://www.xara.com/ 00097 00098 =================================XARAHEADEREND============================ 00099 */ 00100 00101 #include "camtypes.h" 00102 #include "camelot.h" 00103 #include "resdll.h" 00104 #include "stdafx.h" 00105 #include "helpdownloadwebdialog.h" 00106 #include "helpuser.h" 00107 //#include "helppath.h" 00108 #include "product.h" 00109 #include "menuops.h" 00110 #include "camnet.h" 00111 //#include "phil.h" 00112 00113 #ifdef _DEBUG 00114 #define new DEBUG_NEW 00115 #undef THIS_FILE 00116 static char THIS_FILE[] = __FILE__; 00117 #endif 00118 00120 // CHelpDownloadWebDialog dialog 00122 00123 /**************************************************************************** 00124 00125 > CHelpDownloadWebDialog::CHelpDownloadWebDialog(CString WebFile) 00126 00127 Author: Phil_Martin (Xara Group Ltd) <camelotdev@xara.com> 00128 Created: 14/4/2004 00129 Purpose: Construct a CHelpDownloadWebDialog 00130 00131 ****************************************************************************/ 00132 00133 CHelpDownloadWebDialog::CHelpDownloadWebDialog(TCHAR* WebFile) 00134 : CWebDialogDlg(FALSE,WebFile,NULL,FALSE,0) 00135 { 00136 m_bFastConnection = (InternetManager::GetConnectionType()>=CONNECTION_ISDN); 00137 } 00138 00139 00140 00141 BOOL CHelpDownloadWebDialog::OnInitDialog() 00142 { 00143 TRACEUSER( "Phil", _T("CHDlWDlg::InitDialog Entry\n")); 00144 CWebDialogDlg::OnInitDialog(); 00145 TRACEUSER( "Phil", _T("CHDlWDlg::InitDialog 2\n")); 00146 00147 if (m_bFastConnection) 00148 { 00149 m_WebCommand.SetLayerVisibility("fast", TRUE); 00150 m_WebCommand.SetLayerVisibility("slow", FALSE); 00151 } 00152 else 00153 { 00154 m_WebCommand.SetLayerVisibility("fast", FALSE); 00155 m_WebCommand.SetLayerVisibility("slow", TRUE); 00156 } 00157 00158 TRACEUSER( "Phil", _T("CHDlWDlg::InitDialog Exit\n")); 00159 return FALSE; // return TRUE unless you set the focus to a control 00160 } 00161 00162 00163 00164 /**************************************************************************** 00165 00166 Author: Phil_Martin (Xara Group Ltd) <camelotdev@xara.com> 00167 Created: 14/4/2004 00168 Purpose: override the handling of web dialog events 00169 00170 ****************************************************************************/ 00171 00172 void CHelpDownloadWebDialog::OnWebCommandDoCommand(LPCTSTR Command, LPCTSTR CommandInfo) 00173 { 00174 CString sCommand = Command; 00175 CString sCommandInfo = CommandInfo; 00176 TRACE( _T("Received Command:%s\n"), sCommand ); 00177 if (sCommand == "close" || sCommand == "exit" || sCommand == "later") 00178 { 00179 EndDialog(IDCANCEL); 00180 } 00181 else if ( sCommand == "yes" || sCommand == "download" || sCommand == "ok" ) 00182 { 00183 EndDialog(IDOK); 00184 } 00185 else if ( sCommand == "ignore" ) 00186 { 00187 EndDialog(_R(IDB_IGNORE)); 00188 } 00189 else if ( sCommand == "fast") 00190 { 00191 m_WebCommand.SetLayerVisibility("fast", TRUE); 00192 m_WebCommand.SetLayerVisibility("slow", FALSE); 00193 m_bFastConnection = TRUE; 00194 } 00195 else if ( sCommand == "slow" ) 00196 { 00197 m_WebCommand.SetLayerVisibility("fast", FALSE); 00198 m_WebCommand.SetLayerVisibility("slow", TRUE); 00199 m_bFastConnection = FALSE; 00200 } 00201 else if ( sCommand == "help" ) 00202 { 00203 HelpUserTopic(_R(IDS_HELPPATH_Misc_Xara_Ltd)/*23106*/); 00204 } 00205 } 00206