This source file includes following definitions.
- AppFileName
- QuitRequested
- MessageReceived
- main
1
2 #include "Main.h"
3 #include "BF_Def.h"
4 #include "BF_GUI_WinMain.h"
5 #include "BL_Tools.h"
6 #include <Alert.h>
7
8 #include <string.h>
9 #include <stdio.h>
10
11 #include "BF_BetaTesting.h"
12
13 BF_App *poApp = NULL;
14
15 BF_App::BF_App(const char* pc_AppFileName) : BApplication(APP_SIGNATURE)
16 {
17 ASSERT(pc_AppFileName);
18
19 poApp = this;
20 sAppFileName = pc_AppFileName;
21 bAskedQuit = false;
22
23 BF_BetaTesting_InitStatus();
24 if(BF_BETATEST_QUIT==iBetaTestingStatus){
25 be_app->PostMessage(B_QUIT_REQUESTED);
26 return;
27 }
28 BF_GUI_WinMain *po = new BF_GUI_WinMain();
29 po->Show();
30 }
31
32 const BString
33 BF_App::AppFileName()
34 {
35 return BString(sAppFileName);
36 }
37
38 bool BF_App::QuitRequested()
39 {
40
41
42
43
44
45
46
47
48
49
50
51 return true;
52 }
53
54 void
55 BF_App::MessageReceived(BMessage * message)
56 {
57 switch(message->what){
58 case BF_MSG_MAINVIEW_ANSWER_QUIT:{
59 int iQuit = message->FindInt32("bf_iAnswer");
60 if(iQuit==0) bAskedQuit = false;
61 if(iQuit==1) bAskedQuit = true;
62 break;}
63 default:
64 BApplication::MessageReceived(message);
65 }
66 }
67
68 int
69 main( int argc, char** argv )
70 {
71 BF_App app(argv[0]);
72 app.Run();
73 return 0;
74 }