view horori/searcher/src/main.cpp @ 5:519d6fd0bfd9 draft

searcher: bug fix. fcgo: new feature.
author pyon <pyon@macmini>
date Tue, 15 Jun 2021 18:32:28 +0900
parents aaaa401818a1
children
line wrap: on
line source

// Filename   : main.cpp
// Last Change: 2020-04-27 月 17:22:49.
//
#include <wx/fileconf.h>

#include "main.h"
#include "utils.h"
#include "searcher.h"

IMPLEMENT_APP(MyApp)

IMPLEMENT_CLASS(MyApp, wxApp)

MyApp::MyApp()
{
}
MyApp::~MyApp()
{
}

bool MyApp::OnInit()
{
    if (!wxApp::OnInit()) return false;

    wxImage::AddHandler(new wxTIFFHandler);

    wxString conf_file = wxGetCwd() + wxFILE_SEP_PATH + wxT("searcher.conf");
    wxFileConfig* conf = new wxFileConfig(wxT("MyApp"), wxT("T.Mutoh"), conf_file, wxEmptyString, wxCONFIG_USE_LOCAL_FILE);
	wxString buf;
    conf->SetPath(wxT("/Misc"));
    conf->Read(wxT("geometory"), &buf);
	wxRect r = Geo2Rect(buf);
	delete conf;

	SearchFrame *frame = new SearchFrame(NULL, wxID_ANY, wxT("Searcher"), wxDefaultPosition, wxSize(r.GetWidth(), r.GetHeight()), wxDEFAULT_FRAME_STYLE);
	frame->Show(true);
	frame->Raise();

    return true;
}

int MyApp::OnExit()
{
    return 0;
}