7 bool application::OnInit() {
8 wxXmlResource::Get()->InitAllHandlers();
9 // init embedded resources.
11 // init changeable resources.
12 wxXmlResource::Get()->LoadAllFiles("resource");
16 auto res = config.post_query<bool>("?:twitter/service=enable");
19 = config.post_query<mona_string, mona_string>(
20 ">:twitter/user/{id & password}"
22 twitter::login(id_password<0>, id_password<1>);
26 controller = new controller;
28 main_window = new main_window;
29 model.main_window = main_window;
30 main_window->PushEventHandler(controller);
32 auto is_first_executation
33 = config.post_query<bool>(
34 "?:app/last-executation-time=inavailable"
37 if(is_first_executation) {
42 thread_window = new threaad_window;
43 model.thread_window = thread_window;
44 thread_window->PushEventHandler(controller);
46 thread_window->Show();
51 int application::OnExit() {
52 config.post_query<void>(
53 "<:app/last-executation-time", "$:NOW"