forked from bitcoinprogrammer/BitTXGenerator
-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathcheckFieldFrm.h.bak
138 lines (117 loc) · 4.19 KB
/
checkFieldFrm.h.bak
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
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
///-----------------------------------------------------------------
///
/// @file checkFieldFrm.h
/// @author bunkdeath
/// Created: 4/21/2010 10:03:44 PM
/// @section DESCRIPTION
/// checkFieldFrm class declaration
///
///------------------------------------------------------------------
#ifndef __CHECKFIELDFRM_H__
#define __CHECKFIELDFRM_H__
#ifdef __BORLANDC__
#pragma hdrstop
#endif
#ifndef WX_PRECOMP
#include <wx/wx.h>
#include <wx/frame.h>
#else
#include <wx/wxprec.h>
#endif
//Do not add custom headers between
//Header Include Start and Header Include End.
//wxDev-C++ designer will remove them. Add custom headers after the block.
////Header Include Start
////Header Include End
////Dialog Style Start
#undef checkFieldFrm_STYLE
#define checkFieldFrm_STYLE wxTAB_TRAVERSAL | wxCAPTION | wxRESIZE_BORDER | wxSYSTEM_MENU | wxMINIMIZE_BOX | wxCLOSE_BOX
////Dialog Style End
class StartEnd{
public:
int table_name;
int START;
int END;
StartEnd(){
START=1;
END=0;
}
};
class checkFieldFrm : public wxFrame
{
private:
DECLARE_EVENT_TABLE();
public:
checkFieldFrm(wxWindow *parent, wxWindowID id = 1, const wxString &title = wxT("checkField"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = checkFieldFrm_STYLE);
virtual ~checkFieldFrm();
wxString table,table_info,table_name;
void setTableName(wxString);
int start, //declearing for the start of class...
field_index,
total_field,
PPos1, //previous pos 1
PREVIOUS, //Previoud button clicked
NEXT, //Next button clicked
now, //event after now button..
index, // no of field of this table.... read it from checkField()
IPos, // initial position
PPos, // Previous position
CPos, //current stream position
// EPos, // End stream position
Xpos,
Ypos,
data_length, //current editing data length
editing_pos, //position form where editing is to be done
Edit, // edit =0,1,2 0->Edit 1->Save 2->AddRecord
add_record, //to return CPos to initial
delete_record, //to return CPos to initial
save_record; //to return CPos to initial --> may be in the saved record...
private:
//Do not add custom control declarations between
//GUI Control Declaration Start and GUI Control Declaration End.
//wxDev-C++ will remove them. Add custom code after the block.
////GUI Control Declaration Start
////GUI Control Declaration End
wxStaticText *lblField[20];
wxTextCtrl *txtInput[40];
wxButton *btnAddrecord,*btnNext,*btnDelete,*btnEdit,*btnPrevious,*btnExit;
// int index;
private:
//Note: if you receive any error with these enum IDs, then you need to
//change your old form code that are based on the #define control IDs.
//#defines may replace a numeric value for the enum names.
//Try copy and pasting the below block in your old form header files.
enum
{
////GUI Enum Control ID Start
////GUI Enum Control ID End
ID_WXMEMO1 = 1003,
ID_WXEDIT1 = 1002,
ID_WXSTATICTEXT1 = 1001,
ID_BTNADDRECORD=500,
ID_BTNNEXT,
ID_BTNDELETE,
ID_BTNEDIT,
ID_BTNPREVIOUS,
ID_BTNEXIT,
ID_DUMMY_VALUE_ //don't remove this value unless you have other enum values
};
private:
void OnClose(wxCloseEvent& event);
void CreateGUIControls();
void makeGUI(wxString text);
void checkField();
StartEnd readTable(int index);
void btnExitClick(wxCommandEvent &event);
void btnAddrecordClick(wxCommandEvent &event);
void btnPreviousClick(wxCommandEvent &event);
void btnNextClick(wxCommandEvent &event);
void btnDeleteClick(wxCommandEvent &event);
void btnEditClick(wxCommandEvent &event);
friend void getEdited();
void getLastPos();
void addRecord();
int getLength(int cpos);
friend class table_;
};
#endif