forked from bitcoinprogrammer/BitTXGenerator
-
Notifications
You must be signed in to change notification settings - Fork 5
/
DBMSFrm.cpp
97 lines (78 loc) · 2.59 KB
/
DBMSFrm.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
///-----------------------------------------------------------------
///
/// @file DBMSFrm.cpp
/// @author bunkdeath
/// Created: 5/25/2010 10:38:11 AM
/// @section DESCRIPTION
/// DBMSFrm class implementation
///
///------------------------------------------------------------------
#include "DBMSFrm.h"
#include"CreateDatabaseFrm.h"
#include "selectDbTableFrm.h"
#include<wx/dir.h>
//Do not add custom headers between
//Header Include Start and Header Include End
//wxDev-C++ designer will remove them
////Header Include Start
////Header Include End
//----------------------------------------------------------------------------
// DBMSFrm
//----------------------------------------------------------------------------
//Add Custom Events only in the appropriate block.
//Code added in other places will be removed by wxDev-C++
////Event Table Start
BEGIN_EVENT_TABLE(DBMSFrm,wxFrame)
////Manual Code Start
////Manual Code End
EVT_CLOSE(DBMSFrm::OnClose)
EVT_BUTTON(ID_BTNSELECT,DBMSFrm::btnSelectClick)
EVT_BUTTON(ID_BTNCREATE,DBMSFrm::btnCreateClick)
END_EVENT_TABLE()
////Event Table End
DBMSFrm::DBMSFrm(wxWindow *parent, wxWindowID id, const wxString &title, const wxPoint &position, const wxSize& size, long style)
: wxFrame(parent, id, title, position, size, style)
{
CreateGUIControls();
}
DBMSFrm::~DBMSFrm()
{
}
void DBMSFrm::CreateGUIControls()
{
//Do not add custom code between
//GUI Items Creation Start and GUI Items Creation End
//wxDev-C++ designer will remove them.
//Add the custom code before or after the blocks
////GUI Items Creation Start
btnSelect = new wxButton(this, ID_BTNSELECT, wxT("Select Database"), wxPoint(66, 102), wxSize(130, 25), 0, wxDefaultValidator, wxT("btnSelect"));
btnCreate = new wxButton(this, ID_BTNCREATE, wxT("Create Database"), wxPoint(63, 56), wxSize(136, 25), 0, wxDefaultValidator, wxT("btnCreate"));
SetTitle(wxT("DBMS"));
SetIcon(wxNullIcon);
SetSize(8,8,320,334);
Center();
////GUI Items Creation End
current_wd=wxGetCwd();
}
void DBMSFrm::OnClose(wxCloseEvent& event)
{
Destroy();
}
void DBMSFrm::btnCreateClick(wxCommandEvent& event)
{
//current_wd = wxGetCwd();
chdir(current_wd);
CreateDatabaseFrm *create = new CreateDatabaseFrm(this);
create->cwd(current_wd);
create->Show();
// this->Show(false);
// this->Hide();
}
void DBMSFrm::btnSelectClick(wxCommandEvent& event)
{
//current_wd = wxGetCwd();
chdir(current_wd);
selectDbTableFrm *select = new selectDbTableFrm(this);
select->cwd(current_wd);
select->Show();
}