-
Notifications
You must be signed in to change notification settings - Fork 1
/
Template.txt
171 lines (147 loc) · 6.38 KB
/
Template.txt
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
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
program Template;
uses
Vcl.Forms,
Dialogs,
MainMenu in 'MainMenu.pas' {Form1} ,
WispEntity,
WispArrayTools,
WispSkin,
WispDbConnection,
WispQueryTools,
WispUser,
WispAccesManager,
WispLoginDialog,
WispEditBox,
WispDbStructureTools,
WispDistanceTools,
WispPanelUserInfo,
WispTimeTools,
WispStrTools,
WispPanelShortCuts,
WispEntityManager,
WispDatePicker,
WispEntityEditor,
WispEntityGrid,
WispViewTools,
WispPageControl,
WispMainMenuManager,
WispLookUpComboBox,
WispStyleManager,
WispStyleConstants,
WispCheckBox,
WispVisualComponent,
WispMathTools,
WispConsole,
WispHooks,
WispButton,
WispTimePicker,
WispPopupMenu,
WispPanelSearch,
WispPanelAds,
WispTemplate,
WispConstantManager,
WispReportManager,
WispDefaultValue;
{$R *.res}
begin
// Initialize the application
Application.Initialize;
// Initialize the constants controller, required to be initialized first
TConstantManager.Create;
// Global_Singleton_ConstantManager.CurrentLanguage := 'Arabic';
// Global_Singleton_ConstantManager.CurrentLanguage := 'French';
Global_Singleton_ConstantManager.CurrentLanguage := 'English';
// Constants
Global_Singleton_ConstantManager.AppTitle := '';
Global_Singleton_ConstantManager.AppSubTitle := '';
Global_Singleton_ConstantManager.AppVersion := '0.0.0.0';
Global_Singleton_ConstantManager.DbName := '';
Global_Singleton_ConstantManager.DbPort := 3306;
Global_Singleton_ConstantManager.DbUser := 'root';
Global_Singleton_ConstantManager.DbPass := '';
// Initialize other controllers
TDbConnection.Create;
TAccesManager.Create;
TReportManager.Create;
TEntityManager.Create;
TStyleManager.Create;
// Register bitmaps for icons
Global_Singleton_Style.RegisterBitmap('Personnal',
'Skin\Icons\Personnal.bmp');
Global_Singleton_Style.RegisterBitmap('Article', 'Skin\Icons\Article.bmp');
Global_Singleton_Style.RegisterBitmap('COB', 'Skin\Icons\COB.bmp');
Global_Singleton_Style.RegisterBitmap('StockEntry', 'Skin\Icons\Enter.bmp');
Global_Singleton_Style.RegisterBitmap('Intervention',
'Skin\Icons\Equipment.bmp');
Global_Singleton_Style.RegisterBitmap('StockExit', 'Skin\Icons\Exit.bmp');
Global_Singleton_Style.RegisterBitmap('Provider', 'Skin\Icons\Provider.bmp');
Global_Singleton_Style.RegisterBitmap('Engine', 'Skin\Icons\Engine.bmp');
// Entity : Repair Order
{
LastHandledEntity.AddProperty(TEPText.Create('CUSTOMER_FAMILY_NAME',
'Customer''s Family Name'));
LastHandledEntity.AddProperty(TEPText.Create('CUSTOMER_FIRST_NAME',
'Customer''s First Name'));
LastHandledEntity.AddProperty(TEPText.Create('CUSTOMER_PHONE_NUMBER',
'Customer''s Phone Number'));
LastHandledEntity.AddProperty(TEPSubEntity.Create('DEVICE_TYPE',
'Device Type', 'DeviceType', 'DESIGNATION', TRUE));
LastHandledEntity.AddProperty(TEPText.Create('DEVICE_REF',
'Device Reference'));
LastHandledEntity.AddProperty(TEPText.Create('DEVICE_SERIAL_NUMBER',
'Serial number / IMEI'));
LastHandledEntity.AddProperty(TEPText.Create('BUG', 'Panne'));
LastHandledEntity.AddProperty(TEPBoolean.Create('SHUT_OFF', 'Eteint',
'Oui', 'Non'));
LastHandledEntity.AddProperty(TEPBoolean.Create('DROPED_IN_WATER', 'H2O',
'Oui', 'Non'));
LastHandledEntity.AddProperty(TEPText.Create('APPROX_REPAIR_PRICE',
'Approx. repair price'));
LastHandledEntity.AddProperty(TEPSubEntity.Create('REPAIRER', 'Repairer',
'repairer', 'FIRST_NAME,FAMILY_NAME', TRUE));
// Entity : Device type
Global_Singleton_EntityManager.RegisterEntity('DeviceType', 'Device Type');
LastHandledEntity.AddProperty(TEPText.Create('DESIGNATION', 'Designation'));
LastHandledEntity.DisplayShortcut := FALSE;
LastHandledEntity.PredefinedList := TRUE;
{
// Entity : Personnel
Global_Singleton_EntityManager.RegisterEntity('Personnel', 'Personnel');
LastHandledEntity.GlyphName := 'Personnal';
LastHandledEntity.AddProperty(TEPText.Create('FAMILY_NAME', 'Nom'));
LastHandledEntity.AddProperty(TEPText.Create('FIRST_NAME', 'Prénom'));
LastHandledEntity.AddProperty(TEPDate.Create('DATE_OF_BIRTH', 'Date de Naissance'));
LastHandledEntity.AddProperty(TEPText.Create('BIRTH_PLACE', 'Lieu de Naissance'));
LastHandledEntity.AddProperty(TEPDate.Create('RECRUITING_DATE', 'Date de recrutement'));
LastHandledEntity.AddProperty(TEPSubEntity.Create('COB', 'COB', 'COB', 'CODE,NAME', TRUE));
LastHandledEntity.AddProperty(TEPSubEntity.Create('FUNCTION', 'Fonction', 'FUNCTION', 'NAME', TRUE));
LastHandledEntity.AddProperty(TEPSubEntity.Create('QUALIFICATION', 'Qualification', 'QUALIFICATION', 'NAME', TRUE));
LastHandledEntity.AddProperty(TEPText.Create('BLOOD_TYPE', 'Groupe senguin'));
LastHandledEntity.AddProperty(TEPText.Create('COUNTRY', 'Nationalité'));
LastHandledEntity.AddProperty(TEPText.Create('ADDRES', 'Adresse'));
LastHandledEntity.AddProperty(TEPBoolean.Create('CRUCIAL', 'Cruciale','Oui','Non'));
LastHandledEntity.AddProperty(TEPText.Create('SEQUENCE_NUMBER',
'Sequence Number'));
LastHandledEntity.QuickSearchProperty := LastHandledEP;
LastHandledEP.DefaultValue := TWispDVEntityId.Create;
LastHandledEP.Editable := FALSE;
LastHandledEntity.AddProperty(TEPDate.Create('ENTRY_DATE', 'Entry date'));
LastHandledEP.DefaultValue := TWispDVCurrentDate.Create;
LastHandledEP.Editable := FALSE;
LastHandledEntity.AddProperty(TEPTime.Create('ENTRY_TIME', 'Entry Time'));
LastHandledEP.DefaultValue := TWispDVCurrentTime.Create;
LastHandledEP.Editable := FALSE;
LastHandledEntity.AddProperty(TEPText.Create('DOCUMENT', 'Document'));
TEPText(LastHandledEP).LocalFileSelector := TRUE;
LastHandledEntity.AddProperty(TEPText.Create('AUTO_CHECK_PERIOD', 'Préventif (Jours)'));
TEPText(LastHandledEP).SuffixLabel := 'Jours';
// LastHandledEntity.AddDecorator(TEDTimeAlert.Create('PREVENTIV_INTERVENTION_ALERT', 'LAST_CHECK_DATE', '', 'AUTO_CHECK_PERIOD', 'D', TRUE));
//LastHandledEntity.DisplayShortcut := FALSE;
//LastHandledEntity.PredefinedList := TRUE;
}
// Display the main menu
Application.MainFormOnTaskbar := TRUE;
Application.CreateForm(TForm1, Form1);
TMainMenuManager.Create(Form1); // Transform form 1 into wisp's main menu
Application.Run;
end.