00001
00002
00003
00004
00005
00006 #include "stdafx.h"
00007 #include "FdmApp.h"
00008 #include "Dlg_SpreadHelp.h"
00009 #include "Dlg_SpreadHelp_LinkCode.h"
00010
00011 #ifdef _DEBUG
00012 #define new DEBUG_NEW
00013 #undef THIS_FILE
00014 static char THIS_FILE[] = __FILE__;
00015 #endif
00016
00017 CDlg_SpreadHelp::CDlg_SpreadHelp(CWnd* pParent )
00018 : CDialog(CDlg_SpreadHelp::IDD, pParent)
00019 {
00020
00021
00022
00023 }
00024
00025 void CDlg_SpreadHelp::DoDataExchange(CDataExchange* pDX)
00026 {
00027 CDialog::DoDataExchange(pDX);
00028
00029
00030
00031 }
00032
00033 BEGIN_MESSAGE_MAP(CDlg_SpreadHelp, CDialog)
00034
00035 ON_BN_CLICKED(IDC_VIEWLINKCODE, OnViewlinkcode)
00036
00037 END_MESSAGE_MAP()
00038
00039 void CDlg_SpreadHelp::OnViewlinkcode()
00040 {
00041 CDlg_SpreadHelp_LinkCode dlg;
00042 _DlgMgr.DoModal (&dlg);
00043 }
00044
00045 void CDlg_SpreadHelp::OnOK()
00046 {
00047 if (IsDlgButtonChecked (IDC_REMIND_NEXTSTART) == BST_CHECKED)
00048 _App.View_SpreadHelpDialog (SHR_NEXTSTART);
00049 else if (IsDlgButtonChecked (IDC_REMIND_IN3DAYS) == BST_CHECKED)
00050 _App.View_SpreadHelpDialog (SHR_IN3DAYS);
00051 else
00052 _App.View_SpreadHelpDialog (SHR_NEVER);
00053
00054 CDialog::OnOK();
00055 }
00056
00057 BOOL CDlg_SpreadHelp::OnInitDialog()
00058 {
00059 CDialog::OnInitDialog();
00060
00061 vmsSpreadHelpRemind en = _App.View_SpreadHelpDialog ();
00062 if (en == SHR_WAIT1STTIME)
00063 _App.View_SpreadHelpDialog (en = SHR_IN3DAYS);
00064
00065 CheckRadioButton (IDC_REMIND_NEXTSTART, IDC_REMIND_NEVER,
00066 IDC_REMIND_NEXTSTART + en);
00067
00068 SYSTEMTIME st;
00069 FILETIME ft;
00070 GetLocalTime (&st);
00071 SystemTimeToFileTime (&st, &ft);
00072 _App.View_SpreadHelpDialog_LastTimeShown_save (ft);
00073
00074 ApplyLanguage ();
00075
00076 return TRUE;
00077 }
00078
00079 void CDlg_SpreadHelp::ApplyLanguage()
00080 {
00081 fsDlgLngInfo lnginfo [] = {
00082 fsDlgLngInfo (IDC__TEXT1, L_SPREADHELPDLG_TEXT1),
00083 fsDlgLngInfo (IDC__TEXT2, L_SPREADHELPDLG_TEXT2),
00084 fsDlgLngInfo (IDC__TEXT3, L_SPREADHELPDLG_TEXT3),
00085 fsDlgLngInfo (IDC_REMIND_IN3DAYS, L_REMIND_IN3DAYS),
00086 fsDlgLngInfo (IDC_REMIND_NEXTSTART, L_REMIND_NEXTSTART),
00087 fsDlgLngInfo (IDC_REMIND_NEVER, L_DONTSHOWTHISWINDOWAGAIN),
00088 fsDlgLngInfo (IDC_VIEWLINKCODE, L_VIEWLINKHTMLCODE),
00089 };
00090
00091 CString str = LS (L_SPREADHELPDLG_TEXT4); str.Replace ("\\n", "\n");
00092 SetDlgItemText (IDC__TEXT4, str);
00093
00094 _LngMgr.ApplyLanguage (this, lnginfo, sizeof (lnginfo) / sizeof (fsDlgLngInfo), L_PLACELINKTOFDM2);
00095 }
00096