00001
00002
00003
00004
00005
00006 #include "stdafx.h"
00007 #include "FdmApp.h"
00008 #include "DlgCustomizeIEMenu.h"
00009
00010 #ifdef _DEBUG
00011 #define new DEBUG_NEW
00012 #undef THIS_FILE
00013 static char THIS_FILE[] = __FILE__;
00014 #endif
00015
00016 CDlgCustomizeIEMenu::CDlgCustomizeIEMenu(CWnd* pParent )
00017 : CDialog(CDlgCustomizeIEMenu::IDD, pParent)
00018 {
00019
00020
00021
00022 }
00023
00024 void CDlgCustomizeIEMenu::DoDataExchange(CDataExchange* pDX)
00025 {
00026 CDialog::DoDataExchange(pDX);
00027
00028
00029
00030 }
00031
00032 BEGIN_MESSAGE_MAP(CDlgCustomizeIEMenu, CDialog)
00033
00034
00035 END_MESSAGE_MAP()
00036
00037 void CDlgCustomizeIEMenu::OnOK()
00038 {
00039 BOOL bDLThis = IsDlgButtonChecked (IDC_DLTHIS) == BST_CHECKED;
00040 BOOL bDLPage = IsDlgButtonChecked (IDC_DLPAGE) == BST_CHECKED;
00041 BOOL bDLAll = IsDlgButtonChecked (IDC_DLALL) == BST_CHECKED;
00042 BOOL bDLSelected = IsDlgButtonChecked (IDC_DLSELECTED) == BST_CHECKED;
00043 BOOL bDLVideo = IsDlgButtonChecked (IDC_DLVIDEO) == BST_CHECKED;
00044
00045 if (bDLThis || bDLPage || bDLAll || bDLSelected || bDLVideo)
00046 {
00047 _IECMM.DeleteIEMenus ();
00048 _App.Monitor_IEMenu_DLThis (bDLThis);
00049 _App.Monitor_IEMenu_DLPage (bDLPage);
00050 _App.Monitor_IEMenu_DLAll (bDLAll);
00051 _App.Monitor_IEMenu_DLSelected (bDLSelected);
00052 _App.Monitor_IEMenu_DLFlashVideo (bDLVideo);
00053 _IECMM.AddIEMenus ();
00054
00055 if (m_bDLThisWas != bDLThis || m_bDLPageWas != bDLPage ||
00056 m_bDLAllWas != bDLAll || m_bDLSelectedWas != bDLSelected ||
00057 m_bDLVideoWas != bDLVideo)
00058 MessageBox (LS (L_BROWSERRESTARTREQ));
00059 }
00060 else
00061 {
00062 MessageBox (LS (L_ATLEAST1MENUITEMMUSTBESELECTED), LS (L_INPERR),
00063 MB_ICONEXCLAMATION);
00064 return;
00065 }
00066
00067 CDialog::OnOK();
00068 }
00069
00070 BOOL CDlgCustomizeIEMenu::OnInitDialog()
00071 {
00072 CDialog::OnInitDialog();
00073
00074 CheckDlgButton (IDC_DLTHIS, m_bDLThisWas = _App.Monitor_IEMenu_DLThis () ? BST_CHECKED : BST_UNCHECKED);
00075 CheckDlgButton (IDC_DLPAGE, m_bDLPageWas = _App.Monitor_IEMenu_DLPage () ? BST_CHECKED : BST_UNCHECKED);
00076 CheckDlgButton (IDC_DLALL, m_bDLAllWas = _App.Monitor_IEMenu_DLAll () ? BST_CHECKED : BST_UNCHECKED);
00077 CheckDlgButton (IDC_DLSELECTED, m_bDLSelectedWas = _App.Monitor_IEMenu_DLSelected () ? BST_CHECKED : BST_UNCHECKED);
00078 CheckDlgButton (IDC_DLVIDEO, m_bDLVideoWas = _App.Monitor_IEMenu_DLFlashVideo () ? BST_CHECKED : BST_UNCHECKED);
00079
00080 ApplyLanguage ();
00081
00082 return TRUE;
00083 }
00084
00085 void CDlgCustomizeIEMenu::ApplyLanguage()
00086 {
00087 fsDlgLngInfo lnginfo [] = {
00088 fsDlgLngInfo (IDC_DLTHIS, L_DLTHISIEMENU),
00089 fsDlgLngInfo (IDC_DLPAGE, L_DLPAGEIEMENU),
00090 fsDlgLngInfo (IDC_DLALL, L_DLALLIEMENU),
00091 fsDlgLngInfo (IDC_DLSELECTED, L_DLSELECTEDIEMENU),
00092 fsDlgLngInfo (IDC_DLVIDEO, L_DLFLASHVIDEOIEMENU),
00093 fsDlgLngInfo (IDCANCEL, L_CANCEL),
00094 };
00095
00096 _LngMgr.ApplyLanguage (this, lnginfo, sizeof (lnginfo) / sizeof (fsDlgLngInfo), L_CUSTOMIZEIEMENU);
00097 }