diff src/myframe.cpp @ 13:bbd65edf71d4

Implement Hhs DB update dialog.
author pyon@macmini
date Sat, 24 May 2014 10:25:13 +0900
parents 52958cd4a073
children de222bc84e48
line wrap: on
line diff
--- a/src/myframe.cpp	Sun May 18 19:49:15 2014 +0900
+++ b/src/myframe.cpp	Sat May 24 10:25:13 2014 +0900
@@ -1,5 +1,5 @@
 // Filename   : myframe.cpp
-// Last Change: 16-May-2014.
+// Last Change: 23-May-2014.
 //
 #include "main.h"
 #include "db.h"
@@ -8,6 +8,7 @@
 #include "hist.h"
 #include "preview.h"
 #include "index.h"
+#include "hhsdb.h"
 #include "cache.h"
 #include "param.h"
 #include "marksheet.h"
@@ -194,7 +195,7 @@
     PreviewDialog* pd = new PreviewDialog( m_parent, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxCAPTION|wxFRAME_NO_TASKBAR );
     pd->Show();
     pd->Maximize( true );
-    pd->SetFiles( m_imagefiles, m_cachefiles );
+    pd->SetFiles( m_imagefiles, m_cachefiles, n );
     pd->SetPreviewImage( n );
 }
 
@@ -234,10 +235,8 @@
 
     m_menuFile->AppendSeparator(); // ----
 
-    /*
 	wxMenuItem* m_menuItemHhsdb = new wxMenuItem( m_menuFile, ID_MNHHSDB, wxString( wxT("被保険者DB更新(&U)") ) , wxT("Update HHS databases"), wxITEM_NORMAL );
 	m_menuFile->Append( m_menuItemHhsdb );
-    */
 
 	wxMenuItem* m_menuItemBkup = new wxMenuItem( m_menuFile, ID_MNDBBKUP, wxString( wxT("DBバックアップ(&B)") ) , wxT("Backup databases"), wxITEM_NORMAL );
 	m_menuFile->Append( m_menuItemBkup );
@@ -353,6 +352,7 @@
     EVT_MENU( wxID_EXIT,      MyFrame::OnQuit )
     EVT_MENU( ID_MNBPNT,      MyFrame::OnBPrintMode )
     EVT_MENU( ID_MNINDEX,     MyFrame::OnIndex )
+    EVT_MENU( ID_MNHHSDB,     MyFrame::OnUpdateHhs )
     EVT_MENU( ID_MNCACHE,     MyFrame::OnCache )
     EVT_MENU( ID_MNDBBKUP,    MyFrame::OnDBBackup )
     EVT_MENU( ID_MNMASKPARAM, MyFrame::OnMaskParam )
@@ -575,6 +575,12 @@
     cache->Setting( rootdir, THUMB_W, THUMB_H );
     cache->ShowModal();
 }
+/* 被保険者DB更新 */
+void MyFrame::OnUpdateHhs( wxCommandEvent& WXUNUSED(event) )
+{
+    HhsDialog* hd = new HhsDialog( this, wxID_ANY, wxT("被保険者DB更新"), wxDefaultPosition, wxSize( 500, 100 ), wxCAPTION|wxFRAME_NO_TASKBAR );
+    hd->Show();
+}
 /* マークシートパラメータ設定ダイアログ */
 void MyFrame::OnMarkParam( wxCommandEvent& WXUNUSED(event) )
 {