comparison horori/searcher/src/main.cpp @ 0:aaaa401818a1 draft

first commit.
author pyon <pyon@macmini>
date Mon, 24 May 2021 21:32:58 +0900
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:aaaa401818a1
1 // Filename : main.cpp
2 // Last Change: 2020-04-27 月 17:22:49.
3 //
4 #include <wx/fileconf.h>
5
6 #include "main.h"
7 #include "utils.h"
8 #include "searcher.h"
9
10 IMPLEMENT_APP(MyApp)
11
12 IMPLEMENT_CLASS(MyApp, wxApp)
13
14 MyApp::MyApp()
15 {
16 }
17 MyApp::~MyApp()
18 {
19 }
20
21 bool MyApp::OnInit()
22 {
23 if (!wxApp::OnInit()) return false;
24
25 wxImage::AddHandler(new wxTIFFHandler);
26
27 wxString conf_file = wxGetCwd() + wxFILE_SEP_PATH + wxT("searcher.conf");
28 wxFileConfig* conf = new wxFileConfig(wxT("MyApp"), wxT("T.Mutoh"), conf_file, wxEmptyString, wxCONFIG_USE_LOCAL_FILE);
29 wxString buf;
30 conf->SetPath(wxT("/Misc"));
31 conf->Read(wxT("geometory"), &buf);
32 wxRect r = Geo2Rect(buf);
33 delete conf;
34
35 SearchFrame *frame = new SearchFrame(NULL, wxID_ANY, wxT("Searcher"), wxDefaultPosition, wxSize(r.GetWidth(), r.GetHeight()), wxDEFAULT_FRAME_STYLE);
36 frame->Show(true);
37 frame->Raise();
38
39 return true;
40 }
41
42 int MyApp::OnExit()
43 {
44 return 0;
45 }
46