comparison src/main.cpp @ 11:9b0840b0be7e

cache done.
author pyon@macmini
date Sun, 23 Oct 2011 07:43:34 +0900
parents 52697c869ce8
children d10eafafe31f
comparison
equal deleted inserted replaced
10:1fda3a06c39b 11:9b0840b0be7e
1 // Filename : main.cpp 1 // Filename : main.cpp
2 // Last Change: 18-Oct-2011. 2 // Last Change: 22-Oct-2011.
3 // 3 //
4 4
5 #include "common.h" 5 #include "common.h"
6 #include "main.h" 6 #include "main.h"
7 #include "myframe.h" 7 #include "myframe.h"
24 24
25 wxImage::AddHandler( new wxJPEGHandler ); 25 wxImage::AddHandler( new wxJPEGHandler );
26 wxImage::AddHandler( new wxPNGHandler ); 26 wxImage::AddHandler( new wxPNGHandler );
27 27
28 ConfInit(); 28 ConfInit();
29 InitLog();
29 30
30 wxString progname = wxT("A Mover"); 31 wxString progname = wxT("A Mover");
31 wxString verstr = wxString::Format( wxT(" - v%d.%d ( build %d )"), VER, REV, BLD ); 32 wxString verstr = wxString::Format( wxT(" - v%d.%d ( build %d )"), VER, REV, BLD );
32 wxString title = progname + verstr; 33 wxString title = progname + verstr;
33 34
84 config->Read( wxT("lmax"), &lmax ); 85 config->Read( wxT("lmax"), &lmax );
85 config->Read( wxT("zmin"), &zmin ); 86 config->Read( wxT("zmin"), &zmin );
86 config->Read( wxT("zmax"), &zmax ); 87 config->Read( wxT("zmax"), &zmax );
87 } 88 }
88 89
90 void MyApp::InitLog()
91 {
92 wxDateTime now = wxDateTime::Now();
93 wxTextFile logfile;
94 logfile.Open(wxT("log"));
95 logfile.Clear();
96 logfile.AddLine( now.Format(wxT("%F %T ")) + wxT("[Application start...]") );
97 logfile.Write();
98 logfile.Close();
99 }
100 void MyApp::WriteLog( wxString msg )
101 {
102 wxDateTime now = wxDateTime::Now();
103 wxTextFile logfile;
104 logfile.Open(wxT("log"));
105 logfile.AddLine( now.Format(wxT("%F %T ")) + msg );
106 logfile.Write();
107 logfile.Close();
108 }
109