diff --git a/PredictEd User Folder/Contexts/Arabic.context b/PredictEd User Folder/Contexts/Arabic.context index 2f89e4d..4adb79e 100644 --- a/PredictEd User Folder/Contexts/Arabic.context +++ b/PredictEd User Folder/Contexts/Arabic.context @@ -1,4 +1,4 @@ PredictEd Context File Version,11 Context Name,Arabic Knowledge Dir,C:\Users\Sanjeev\Documents\Oormi Creations\PredictEd 1.1.0\Contexts\Arabic -Dictionary File,C:\Users\Sanjeev\Documents\Oormi Creations\PredictEd 1.1.0\Dictionary\HI-IN\hi-in2.txt \ No newline at end of file +Dictionary File,C:\Users\Sanjeev\Documents\Oormi Creations\PredictEd 1.1.0\Dictionary\ArabicDict.txt \ No newline at end of file diff --git a/PredictEd User Folder/Contexts/Arabic/PredictEd_LTM_Backup.txt b/PredictEd User Folder/Contexts/Arabic/PredictEd_LTM_Backup.txt deleted file mode 100644 index 116793f..0000000 --- a/PredictEd User Folder/Contexts/Arabic/PredictEd_LTM_Backup.txt +++ /dev/null @@ -1 +0,0 @@ -PredictEd Knowledge Map,Version,11,LTM diff --git a/PredictEd User Folder/Contexts/Arabic/PredictEd_STM_Backup.txt b/PredictEd User Folder/Contexts/Arabic/PredictEd_STM_Backup.txt deleted file mode 100644 index 69c58af..0000000 --- a/PredictEd User Folder/Contexts/Arabic/PredictEd_STM_Backup.txt +++ /dev/null @@ -1 +0,0 @@ -PredictEd Knowledge Map,Version,11,STM diff --git a/PredictEd User Folder/Contexts/Biology.context b/PredictEd User Folder/Contexts/Biology.context index 82b4a34..d8bce45 100644 --- a/PredictEd User Folder/Contexts/Biology.context +++ b/PredictEd User Folder/Contexts/Biology.context @@ -1,4 +1,4 @@ PredictEd Context File Version,11 Context Name,Biology Knowledge Dir,C:\Users\Sanjeev\Documents\Oormi Creations\PredictEd 1.1.0\Contexts\Biology -Dictionary File,C:\Users\Sanjeev\Documents\Oormi Creations\PredictEd 1.1.0\Dictionary\HI-IN\hi-in2.txt \ No newline at end of file +Dictionary File,C:\Users\Sanjeev\Documents\Oormi Creations\PredictEd 1.1.0\Dictionary\Default\DefaultDict.txt \ No newline at end of file diff --git a/PredictEd User Folder/Contexts/Biology/PredictEd_LTM_Backup.txt b/PredictEd User Folder/Contexts/Biology/PredictEd_LTM_Backup.txt deleted file mode 100644 index 116793f..0000000 --- a/PredictEd User Folder/Contexts/Biology/PredictEd_LTM_Backup.txt +++ /dev/null @@ -1 +0,0 @@ -PredictEd Knowledge Map,Version,11,LTM diff --git a/PredictEd User Folder/Contexts/Biology/PredictEd_STM_Backup.txt b/PredictEd User Folder/Contexts/Biology/PredictEd_STM_Backup.txt deleted file mode 100644 index 69c58af..0000000 --- a/PredictEd User Folder/Contexts/Biology/PredictEd_STM_Backup.txt +++ /dev/null @@ -1 +0,0 @@ -PredictEd Knowledge Map,Version,11,STM diff --git a/PredictEd User Folder/Contexts/Business.context b/PredictEd User Folder/Contexts/Business.context index afac1f4..2dbb993 100644 --- a/PredictEd User Folder/Contexts/Business.context +++ b/PredictEd User Folder/Contexts/Business.context @@ -1,4 +1,4 @@ PredictEd Context File Version,11 Context Name,Business Knowledge Dir,C:\Users\Sanjeev\Documents\Oormi Creations\PredictEd 1.1.0\Contexts\Business -Dictionary File,C:\Users\Sanjeev\Documents\Oormi Creations\PredictEd 1.1.0\Dictionary\HI-IN\hi-in2.txt \ No newline at end of file +Dictionary File,C:\Users\Sanjeev\Documents\Oormi Creations\PredictEd 1.1.0\Dictionary\Default\DefaultDict.txt \ No newline at end of file diff --git a/PredictEd User Folder/Contexts/Business/PredictEd_LTM_Backup.txt b/PredictEd User Folder/Contexts/Business/PredictEd_LTM_Backup.txt deleted file mode 100644 index 116793f..0000000 --- a/PredictEd User Folder/Contexts/Business/PredictEd_LTM_Backup.txt +++ /dev/null @@ -1 +0,0 @@ -PredictEd Knowledge Map,Version,11,LTM diff --git a/PredictEd User Folder/Contexts/Business/PredictEd_STM_Backup.txt b/PredictEd User Folder/Contexts/Business/PredictEd_STM_Backup.txt deleted file mode 100644 index 69c58af..0000000 --- a/PredictEd User Folder/Contexts/Business/PredictEd_STM_Backup.txt +++ /dev/null @@ -1 +0,0 @@ -PredictEd Knowledge Map,Version,11,STM diff --git a/PredictEd User Folder/Contexts/Chinese.context b/PredictEd User Folder/Contexts/Chinese.context index 226e070..e4e5ff7 100644 --- a/PredictEd User Folder/Contexts/Chinese.context +++ b/PredictEd User Folder/Contexts/Chinese.context @@ -1,4 +1,4 @@ PredictEd Context File Version,11 Context Name,Chinese Knowledge Dir,C:\Users\Sanjeev\Documents\Oormi Creations\PredictEd 1.1.0\Contexts\Chinese -Dictionary File,C:\Users\Sanjeev\Documents\Oormi Creations\PredictEd 1.1.0\Dictionary\HI-IN\hi-in2.txt \ No newline at end of file +Dictionary File,C:\Users\Sanjeev\Documents\Oormi Creations\PredictEd 1.1.0\Dictionary\ChineseDict.txt \ No newline at end of file diff --git a/PredictEd User Folder/Contexts/Chinese/PredictEd_LTM_Backup.txt b/PredictEd User Folder/Contexts/Chinese/PredictEd_LTM_Backup.txt deleted file mode 100644 index 116793f..0000000 --- a/PredictEd User Folder/Contexts/Chinese/PredictEd_LTM_Backup.txt +++ /dev/null @@ -1 +0,0 @@ -PredictEd Knowledge Map,Version,11,LTM diff --git a/PredictEd User Folder/Contexts/Chinese/PredictEd_STM_Backup.txt b/PredictEd User Folder/Contexts/Chinese/PredictEd_STM_Backup.txt deleted file mode 100644 index 69c58af..0000000 --- a/PredictEd User Folder/Contexts/Chinese/PredictEd_STM_Backup.txt +++ /dev/null @@ -1 +0,0 @@ -PredictEd Knowledge Map,Version,11,STM diff --git a/PredictEd User Folder/Contexts/Default/PredictEd_LTM_Backup.txt b/PredictEd User Folder/Contexts/Default/PredictEd_LTM_Backup.txt deleted file mode 100644 index 116793f..0000000 --- a/PredictEd User Folder/Contexts/Default/PredictEd_LTM_Backup.txt +++ /dev/null @@ -1 +0,0 @@ -PredictEd Knowledge Map,Version,11,LTM diff --git a/PredictEd User Folder/Contexts/Default/PredictEd_STM_Backup.txt b/PredictEd User Folder/Contexts/Default/PredictEd_STM_Backup.txt deleted file mode 100644 index b486797..0000000 --- a/PredictEd User Folder/Contexts/Default/PredictEd_STM_Backup.txt +++ /dev/null @@ -1,29 +0,0 @@ -PredictEd Knowledge Map,Version,11,STM -using,2,auto,#,#,#,#,2,0,0,0,0 -auto,2,backup,#,#,#,#,2,0,0,0,0 -backup,2,#,#,#,#,#,0,0,0,0,0 -from,3,wikipedia,httpwortschatzunileipzigdeendownload,httpsopenbccampusca,#,#,2,1,1,0,0 -wikipedia,2,and,#,#,#,#,1,0,0,0,0 -errrer,1,tyty,#,#,#,#,1,0,0,0,0 -tyty,1,tyt,#,#,#,#,1,0,0,0,0 -tyt,1,#,#,#,#,#,0,0,0,0,0 -rt,1,rte,#,#,#,#,1,0,0,0,0 -rte,1,ert,#,#,#,#,1,0,0,0,0 -ert,1,tert,#,#,#,#,1,0,0,0,0 -tert,1,#,#,#,#,#,0,0,0,0,0 -the,1,context,content,#,#,#,1,1,0,0,0 -context,1,#,#,#,#,#,0,0,0,0,0 -content,1,here,#,#,#,#,1,0,0,0,0 -here,1,has,#,#,#,#,1,0,0,0,0 -has,1,been,#,#,#,#,1,0,0,0,0 -been,1,taken,#,#,#,#,1,0,0,0,0 -taken,1,from,#,#,#,#,1,0,0,0,0 -uioiu,1,ioppp,#,#,#,#,1,0,0,0,0 -httpwortschatzunileipzigdeendownload,1,it,#,#,#,#,1,0,0,0,0 -it,1,is,#,#,#,#,1,0,0,0,0 -is,1,sampled,#,#,#,#,1,0,0,0,0 -sampled,1,from,#,#,#,#,1,0,0,0,0 -ioppp,1,#,#,#,#,#,0,0,0,0,0 -and,2,from,#,#,#,#,1,0,0,0,0 -httpsopenbccampusca,1,httpwwwopenculturecomfreephysicstextbooks,#,#,#,#,1,0,0,0,0 -httpwwwopenculturecomfreephysicstextbooks,1,#,#,#,#,#,0,0,0,0,0 diff --git a/PredictEd User Folder/Contexts/French.context b/PredictEd User Folder/Contexts/French.context index 57b1fe8..f405594 100644 --- a/PredictEd User Folder/Contexts/French.context +++ b/PredictEd User Folder/Contexts/French.context @@ -1,4 +1,4 @@ PredictEd Context File Version,11 Context Name,French Knowledge Dir,C:\Users\Sanjeev\Documents\Oormi Creations\PredictEd 1.1.0\Contexts\French -Dictionary File,C:\Users\Sanjeev\Documents\Oormi Creations\PredictEd 1.1.0\Dictionary\HI-IN\hi-in2.txt \ No newline at end of file +Dictionary File,C:\Users\Sanjeev\Documents\Oormi Creations\PredictEd 1.1.0\Dictionary\Default\DefaultDict.txt \ No newline at end of file diff --git a/PredictEd User Folder/Contexts/French/PredictEd_LTM_Backup.txt b/PredictEd User Folder/Contexts/French/PredictEd_LTM_Backup.txt deleted file mode 100644 index 116793f..0000000 --- a/PredictEd User Folder/Contexts/French/PredictEd_LTM_Backup.txt +++ /dev/null @@ -1 +0,0 @@ -PredictEd Knowledge Map,Version,11,LTM diff --git a/PredictEd User Folder/Contexts/French/PredictEd_STM_Backup.txt b/PredictEd User Folder/Contexts/French/PredictEd_STM_Backup.txt deleted file mode 100644 index 69c58af..0000000 --- a/PredictEd User Folder/Contexts/French/PredictEd_STM_Backup.txt +++ /dev/null @@ -1 +0,0 @@ -PredictEd Knowledge Map,Version,11,STM diff --git a/PredictEd User Folder/Contexts/German.context b/PredictEd User Folder/Contexts/German.context index 262d5a5..a0ab189 100644 --- a/PredictEd User Folder/Contexts/German.context +++ b/PredictEd User Folder/Contexts/German.context @@ -1,4 +1,4 @@ PredictEd Context File Version,11 Context Name,German Knowledge Dir,C:\Users\Sanjeev\Documents\Oormi Creations\PredictEd 1.1.0\Contexts\German -Dictionary File,C:\Users\Sanjeev\Documents\Oormi Creations\PredictEd 1.1.0\Dictionary\HI-IN\hi-in2.txt \ No newline at end of file +Dictionary File,C:\Users\Sanjeev\Documents\Oormi Creations\PredictEd 1.1.0\Dictionary\GermanDict.txt \ No newline at end of file diff --git a/PredictEd User Folder/Contexts/German/PredictEd_LTM_Backup.txt b/PredictEd User Folder/Contexts/German/PredictEd_LTM_Backup.txt deleted file mode 100644 index 116793f..0000000 --- a/PredictEd User Folder/Contexts/German/PredictEd_LTM_Backup.txt +++ /dev/null @@ -1 +0,0 @@ -PredictEd Knowledge Map,Version,11,LTM diff --git a/PredictEd User Folder/Contexts/German/PredictEd_STM_Backup.txt b/PredictEd User Folder/Contexts/German/PredictEd_STM_Backup.txt deleted file mode 100644 index 69c58af..0000000 --- a/PredictEd User Folder/Contexts/German/PredictEd_STM_Backup.txt +++ /dev/null @@ -1 +0,0 @@ -PredictEd Knowledge Map,Version,11,STM diff --git a/PredictEd User Folder/Contexts/Marathi.context b/PredictEd User Folder/Contexts/Marathi.context index ef8f949..27ca0ff 100644 --- a/PredictEd User Folder/Contexts/Marathi.context +++ b/PredictEd User Folder/Contexts/Marathi.context @@ -1,4 +1,4 @@ PredictEd Context File Version,11 Context Name,Marathi Knowledge Dir,C:\Users\Sanjeev\Documents\Oormi Creations\PredictEd 1.1.0\Contexts\Marathi -Dictionary File,C:\Users\Sanjeev\Documents\Oormi Creations\PredictEd 1.1.0\Dictionary\HI-IN\hi-in2.txt \ No newline at end of file +Dictionary File,C:\Users\Sanjeev\Documents\Oormi Creations\PredictEd 1.1.0\Dictionary\MarathiDict.txt \ No newline at end of file diff --git a/PredictEd User Folder/Contexts/Marathi/PredictEd_LTM_Backup.txt b/PredictEd User Folder/Contexts/Marathi/PredictEd_LTM_Backup.txt deleted file mode 100644 index 116793f..0000000 --- a/PredictEd User Folder/Contexts/Marathi/PredictEd_LTM_Backup.txt +++ /dev/null @@ -1 +0,0 @@ -PredictEd Knowledge Map,Version,11,LTM diff --git a/PredictEd User Folder/Contexts/Marathi/PredictEd_STM_Backup.txt b/PredictEd User Folder/Contexts/Marathi/PredictEd_STM_Backup.txt deleted file mode 100644 index 69c58af..0000000 --- a/PredictEd User Folder/Contexts/Marathi/PredictEd_STM_Backup.txt +++ /dev/null @@ -1 +0,0 @@ -PredictEd Knowledge Map,Version,11,STM diff --git a/PredictEd User Folder/Contexts/Philosophy.context b/PredictEd User Folder/Contexts/Philosophy.context index a08e569..dbc00c9 100644 --- a/PredictEd User Folder/Contexts/Philosophy.context +++ b/PredictEd User Folder/Contexts/Philosophy.context @@ -1,4 +1,4 @@ PredictEd Context File Version,11 Context Name,Philosophy Knowledge Dir,C:\Users\Sanjeev\Documents\Oormi Creations\PredictEd 1.1.0\Contexts\Philosophy -Dictionary File,C:\Users\Sanjeev\Documents\Oormi Creations\PredictEd 1.1.0\Dictionary\HI-IN\hi-in2.txt \ No newline at end of file +Dictionary File,C:\Users\Sanjeev\Documents\Oormi Creations\PredictEd 1.1.0\Dictionary\Default\DefaultDict.txt \ No newline at end of file diff --git a/PredictEd User Folder/Contexts/Philosophy/PredictEd_LTM_Backup.txt b/PredictEd User Folder/Contexts/Philosophy/PredictEd_LTM_Backup.txt deleted file mode 100644 index 116793f..0000000 --- a/PredictEd User Folder/Contexts/Philosophy/PredictEd_LTM_Backup.txt +++ /dev/null @@ -1 +0,0 @@ -PredictEd Knowledge Map,Version,11,LTM diff --git a/PredictEd User Folder/Contexts/Philosophy/PredictEd_STM_Backup.txt b/PredictEd User Folder/Contexts/Philosophy/PredictEd_STM_Backup.txt deleted file mode 100644 index 69c58af..0000000 --- a/PredictEd User Folder/Contexts/Philosophy/PredictEd_STM_Backup.txt +++ /dev/null @@ -1 +0,0 @@ -PredictEd Knowledge Map,Version,11,STM diff --git a/PredictEd User Folder/Contexts/Physics.context b/PredictEd User Folder/Contexts/Physics.context index d4e9827..1ffc95b 100644 --- a/PredictEd User Folder/Contexts/Physics.context +++ b/PredictEd User Folder/Contexts/Physics.context @@ -1,4 +1,4 @@ PredictEd Context File Version,11 Context Name,Physics Knowledge Dir,C:\Users\Sanjeev\Documents\Oormi Creations\PredictEd 1.1.0\Contexts\Physics -Dictionary File,C:\Users\Sanjeev\Documents\Oormi Creations\PredictEd 1.1.0\Dictionary\HI-IN\hi-in2.txt \ No newline at end of file +Dictionary File,C:\Users\Sanjeev\Documents\Oormi Creations\PredictEd 1.1.0\Dictionary\Default\DefaultDict.txt \ No newline at end of file diff --git a/PredictEd User Folder/Contexts/Physics/PredictEd_LTM_Backup.txt b/PredictEd User Folder/Contexts/Physics/PredictEd_LTM_Backup.txt deleted file mode 100644 index 116793f..0000000 --- a/PredictEd User Folder/Contexts/Physics/PredictEd_LTM_Backup.txt +++ /dev/null @@ -1 +0,0 @@ -PredictEd Knowledge Map,Version,11,LTM diff --git a/PredictEd User Folder/Contexts/Physics/PredictEd_STM_Backup.txt b/PredictEd User Folder/Contexts/Physics/PredictEd_STM_Backup.txt deleted file mode 100644 index 69c58af..0000000 --- a/PredictEd User Folder/Contexts/Physics/PredictEd_STM_Backup.txt +++ /dev/null @@ -1 +0,0 @@ -PredictEd Knowledge Map,Version,11,STM diff --git a/PredictEd User Folder/Contexts/Psychology.context b/PredictEd User Folder/Contexts/Psychology.context index d79b886..d7b4207 100644 --- a/PredictEd User Folder/Contexts/Psychology.context +++ b/PredictEd User Folder/Contexts/Psychology.context @@ -1,4 +1,4 @@ PredictEd Context File Version,11 Context Name,Psychology Knowledge Dir,C:\Users\Sanjeev\Documents\Oormi Creations\PredictEd 1.1.0\Contexts\Psychology -Dictionary File,C:\Users\Sanjeev\Documents\Oormi Creations\PredictEd 1.1.0\Dictionary\HI-IN\hi-in2.txt \ No newline at end of file +Dictionary File,C:\Users\Sanjeev\Documents\Oormi Creations\PredictEd 1.1.0\Dictionary\Default\DefaultDict.txt \ No newline at end of file diff --git a/PredictEd User Folder/Contexts/Psychology/PredictEd_LTM_Backup.txt b/PredictEd User Folder/Contexts/Psychology/PredictEd_LTM_Backup.txt deleted file mode 100644 index 116793f..0000000 --- a/PredictEd User Folder/Contexts/Psychology/PredictEd_LTM_Backup.txt +++ /dev/null @@ -1 +0,0 @@ -PredictEd Knowledge Map,Version,11,LTM diff --git a/PredictEd User Folder/Contexts/Psychology/PredictEd_STM_Backup.txt b/PredictEd User Folder/Contexts/Psychology/PredictEd_STM_Backup.txt deleted file mode 100644 index 69c58af..0000000 --- a/PredictEd User Folder/Contexts/Psychology/PredictEd_STM_Backup.txt +++ /dev/null @@ -1 +0,0 @@ -PredictEd Knowledge Map,Version,11,STM diff --git a/PredictEd User Folder/Contexts/Russian.context b/PredictEd User Folder/Contexts/Russian.context index d9fb1b4..2f51f03 100644 --- a/PredictEd User Folder/Contexts/Russian.context +++ b/PredictEd User Folder/Contexts/Russian.context @@ -1,4 +1,4 @@ PredictEd Context File Version,11 Context Name,Russian Knowledge Dir,C:\Users\Sanjeev\Documents\Oormi Creations\PredictEd 1.1.0\Contexts\Russian -Dictionary File,C:\Users\Sanjeev\Documents\Oormi Creations\PredictEd 1.1.0\Dictionary\HI-IN\hi-in2.txt \ No newline at end of file +Dictionary File,C:\Users\Sanjeev\Documents\Oormi Creations\PredictEd 1.1.0\Dictionary\RussianDict.txt \ No newline at end of file diff --git a/PredictEd User Folder/Contexts/Russian/PredictEd_LTM_Backup.txt b/PredictEd User Folder/Contexts/Russian/PredictEd_LTM_Backup.txt deleted file mode 100644 index 116793f..0000000 --- a/PredictEd User Folder/Contexts/Russian/PredictEd_LTM_Backup.txt +++ /dev/null @@ -1 +0,0 @@ -PredictEd Knowledge Map,Version,11,LTM diff --git a/PredictEd User Folder/Contexts/Russian/PredictEd_STM_Backup.txt b/PredictEd User Folder/Contexts/Russian/PredictEd_STM_Backup.txt deleted file mode 100644 index 69c58af..0000000 --- a/PredictEd User Folder/Contexts/Russian/PredictEd_STM_Backup.txt +++ /dev/null @@ -1 +0,0 @@ -PredictEd Knowledge Map,Version,11,STM diff --git a/PredictEd/PredictEdContext.cpp b/PredictEd/PredictEdContext.cpp index cf0e765..43595d3 100644 --- a/PredictEd/PredictEdContext.cpp +++ b/PredictEd/PredictEdContext.cpp @@ -60,7 +60,7 @@ BOOL CPredictEdContext::LoadContext() //ver check CString sValue = GetValue(sLine[0], PREDICTED_CONTEXT_KEY1); - if (sValue != _T("11")) + if (!((sValue == _T("11")) || (sValue == _T("1")))) { AfxMessageBox(_T("Error: This context file belongs to a different version."), MB_ICONERROR); return FALSE; @@ -71,7 +71,7 @@ BOOL CPredictEdContext::LoadContext() if (sValue.IsEmpty()) { AfxMessageBox(_T("Error: This context has no name, assuming a temp name."), MB_ICONERROR); - m_sContextName = _T("Untitled Context"); + m_sContextName = _T("UntitledContext"); } else m_sContextName = sValue; @@ -83,16 +83,16 @@ BOOL CPredictEdContext::LoadContext() return FALSE; } - if (sValue == _T("Default")) - { + //if (sValue == _T("Default")) + //{ m_sLTMFile = m_sContextRootDir + _T("\\") + sValue + _T("\\") + PREDICTED_LTM_FILE_NAME; m_sSTMFile = m_sContextRootDir + _T("\\") + sValue + _T("\\") + PREDICTED_STM_FILE_NAME; - } - else - { - m_sLTMFile = sValue + _T("\\") + PREDICTED_LTM_FILE_NAME; - m_sSTMFile = sValue + _T("\\") + PREDICTED_STM_FILE_NAME; - } + //} + //else + //{ + // m_sLTMFile = sValue + _T("\\") + PREDICTED_LTM_FILE_NAME; + // m_sSTMFile = sValue + _T("\\") + PREDICTED_STM_FILE_NAME; + //} //dictionary file sValue = GetValue(sLine[3], PREDICTED_CONTEXT_KEY4); @@ -102,11 +102,11 @@ BOOL CPredictEdContext::LoadContext() return FALSE; } - if (sValue == _T("DefaultDict.txt")) - { - m_sDictionary = m_SysHelper.GetUserDocumentPath(PREDICTED_USER_FOLDER) + _T("\\") + PREDICTED_DIC_DIR_NAME + _T("\\Default\\")+ sValue; - } - else m_sDictionary = sValue; + //if (sValue == _T("DefaultDict.txt")) + //{ + m_sDictionary = m_SysHelper.GetUserDocumentPath(PREDICTED_USER_FOLDER) + _T("\\") + PREDICTED_DIC_DIR_NAME + _T("\\")+ sValue; + //} + //else m_sDictionary = sValue; m_sContextDir = m_sContextRootDir + _T("\\") + m_sContextName; @@ -144,8 +144,8 @@ BOOL CPredictEdContext::CreateContext() CString sContextInfo = PREDICTED_CONTEXT_KEY1 + m_sVersion + _T("\r\n") + PREDICTED_CONTEXT_KEY2 + m_sContextName + _T("\r\n") - + PREDICTED_CONTEXT_KEY3 + m_sContextDir + _T("\r\n") - + PREDICTED_CONTEXT_KEY4 + m_sDictionary + + PREDICTED_CONTEXT_KEY3 + m_sContextName + _T("\r\n") + + PREDICTED_CONTEXT_KEY4 + m_SysHelper.GetFileNameFromPath(m_sDictionary) ; if (!m_SysHelper.SaveString(m_sContextFile, sContextInfo)) @@ -241,8 +241,8 @@ BOOL CPredictEdContext::UpdateContext() CString sContextInfo = PREDICTED_CONTEXT_KEY1 + m_sVersion + _T("\r\n") + PREDICTED_CONTEXT_KEY2 + m_sContextName + _T("\r\n") - + PREDICTED_CONTEXT_KEY3 + m_sContextDir + _T("\r\n") - + PREDICTED_CONTEXT_KEY4 + m_sDictionary + + PREDICTED_CONTEXT_KEY3 + m_sContextName + _T("\r\n") + + PREDICTED_CONTEXT_KEY4 + m_SysHelper.GetFileNameFromPath(m_sDictionary) ; if (!m_SysHelper.SaveString(m_sContextFile, sContextInfo)) diff --git a/PredictEd/PredictEdDlg.cpp b/PredictEd/PredictEdDlg.cpp index 45a6487..89fb09a 100644 --- a/PredictEd/PredictEdDlg.cpp +++ b/PredictEd/PredictEdDlg.cpp @@ -520,6 +520,8 @@ void CPredictEdDlg::OnFileOpen32771() m_Ed.SetScrollPos(SB_VERT, 0); m_Ed.SetCaretPos(CPoint(0, 0)); m_Ed.SetSel(0, 0); + + m_ShellOpenFileName.Empty(); } @@ -1151,8 +1153,9 @@ void CPredictEdDlg::OnEditSpellingcheck() if (!spelldlg.LoadDictionary()) { - AfxMessageBox(_T("Error reading the Dictionary file."), MB_ICONERROR); - return; + AfxMessageBox(_T("Error reading the Dictionary file.\r\nPlease set the Dictionary File by clicking the Dictionary button before spell check."), MB_ICONERROR); + spelldlg.m_DicFile.Empty(); + //return; } m_Ed.GetWindowText(spelldlg.m_Content); @@ -1225,6 +1228,9 @@ void CPredictEdDlg::OnContextsLoadcontext() m_Ed.m_STMFileName = m_Context.m_sSTMFile; ShowMessage(); + + m_Ed.SetSel(0, 0); + } else { diff --git a/PredictEd/SpellCheckDlg.cpp b/PredictEd/SpellCheckDlg.cpp index cbf91d5..13783e8 100644 --- a/PredictEd/SpellCheckDlg.cpp +++ b/PredictEd/SpellCheckDlg.cpp @@ -296,23 +296,24 @@ void CSpellCheckDlg::OnBnClickedCancel() BOOL CSpellCheckDlg::UpdateDictionary() { - CString dicfilename = m_SysHelper.GetPredictEdFileName(PREDICTED_DIC_FILE); - if (dicfilename.IsEmpty()) return FALSE; + if (m_AddedDicWords.GetCount() > 0) + { + CStdioFile dfile; + if (!dfile.Open(m_DicFile, CStdioFile::modeWrite)) return FALSE; - CStdioFile dfile; - if (!dfile.Open(dicfilename, CStdioFile::modeWrite)) return FALSE; + dfile.SeekToEnd(); - dfile.SeekToEnd(); + CString line; + for (int n = 0; n < m_AddedDicWords.GetCount(); n++) + { + line = m_AddedDicWords.GetAt(n); + dfile.WriteString(_T("\n")); + dfile.WriteString(line); + } - CString line; - for (int n = 0; n < m_AddedDicWords.GetCount(); n++) - { - line = m_AddedDicWords.GetAt(n); - dfile.WriteString(_T("\n")); - dfile.WriteString(line); + dfile.Close(); } - dfile.Close(); return TRUE; } diff --git a/PredictEd/SysHelper.cpp b/PredictEd/SysHelper.cpp index 2f22ab6..16fc009 100644 --- a/PredictEd/SysHelper.cpp +++ b/PredictEd/SysHelper.cpp @@ -110,7 +110,12 @@ CString CSysHelper::ReadStringFromFile(CString filename) if (file.Open(filename, CFile::modeRead)) { - int len = file.GetLength(); + ULONG len = file.GetLength(); + if (len > 500000000)//500MB + { + AfxMessageBox(_T("Warning: File is too big for this program to handle. Your may get out of memory errors!")); + } + char * buf = new char[len + 1]; file.Read(buf, len); diff --git a/PredictEd/Train.cpp b/PredictEd/Train.cpp index 3bbe831..203a7fe 100644 --- a/PredictEd/Train.cpp +++ b/PredictEd/Train.cpp @@ -115,7 +115,7 @@ UINT TrainDataProc(LPVOID param) if (!content.IsEmpty()) { - UINT len = content.GetLength(); + ULONG len = content.GetLength(); CString word, lastword; for (UINT np = 0; np < len; np++)