Skip to content

Commit 11a9c14

Browse files
committed
before-remove-firedac
1 parent ca1ca92 commit 11a9c14

11 files changed

+492
-76
lines changed

Package/DelphiAIDeveloper.dpk

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@ contains
8080
DelphiAIDev.Utils.GetIniPositionStr in '..\Src\Utils\DelphiAIDev.Utils.GetIniPositionStr.pas',
8181
DelphiAIDev.DefaultsQuestions.Model in '..\Src\DefaultsQuestions\DelphiAIDev.DefaultsQuestions.Model.pas',
8282
DelphiAIDev.DefaultsQuestions.Interfaces in '..\Src\DefaultsQuestions\DelphiAIDev.DefaultsQuestions.Interfaces.pas',
83-
DelphiAIDev.DefaultsQuestions.Dao in '..\Src\DefaultsQuestions\DelphiAIDev.DefaultsQuestions.Dao.pas';
83+
DelphiAIDev.DefaultsQuestions.Dao in '..\Src\DefaultsQuestions\DelphiAIDev.DefaultsQuestions.Dao.pas',
84+
DelphiAIDev.DefaultsQuestions.AddEdit.View in '..\Src\DefaultsQuestions\DelphiAIDev.DefaultsQuestions.AddEdit.View.pas' {DelphiAIDevDefaultsQuestionsAddEditView};
8485

8586
end.

Package/DelphiAIDeveloper.dproj

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -184,6 +184,10 @@
184184
<DCCReference Include="..\Src\DefaultsQuestions\DelphiAIDev.DefaultsQuestions.Model.pas"/>
185185
<DCCReference Include="..\Src\DefaultsQuestions\DelphiAIDev.DefaultsQuestions.Interfaces.pas"/>
186186
<DCCReference Include="..\Src\DefaultsQuestions\DelphiAIDev.DefaultsQuestions.Dao.pas"/>
187+
<DCCReference Include="..\Src\DefaultsQuestions\DelphiAIDev.DefaultsQuestions.AddEdit.View.pas">
188+
<Form>DelphiAIDevDefaultsQuestionsAddEditView</Form>
189+
<FormType>dfm</FormType>
190+
</DCCReference>
187191
<RcItem Include="Img\c4d_gear.bmp">
188192
<ResourceType>BITMAP</ResourceType>
189193
<ResourceId>c4d_gear</ResourceId>

Src/Conn/C4D.Conn.Firedac.pas

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@ function TC4DConnFiredac.LoadConnectionConfig: IC4DConnection;
7575
begin
7676
Result := Self;
7777
FConnection.Close;
78+
FConnection.LoginPrompt := False;
7879
FConnection.Params.Clear;
7980
FConnection.Params.DriverID := 'SQLite';
8081
FConnection.Params.Database := FC4DConnConfigs.Database;

Src/Conn/C4D.Conn.pas

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,9 @@ function C4DConn: IC4DConn;
4444

4545
implementation
4646

47+
uses
48+
DelphiAIDev.Utils;
49+
4750
class function TC4DConn.New: IC4DConn;
4851
begin
4952
Result := Self.Create;
@@ -52,7 +55,9 @@ class function TC4DConn.New: IC4DConn;
5255
constructor TC4DConn.Create;
5356
begin
5457
FCountNameQuery := 0;
55-
FC4DConnConfigs := TC4DConnConfigs.New;
58+
FC4DConnConfigs := TC4DConnConfigs.New
59+
.ComponentConnectionFireDac
60+
.Database(TUtils.GetPathFileBdDefaultsQuestions);
5661
end;
5762

5863
destructor TC4DConn.Destroy;

Src/Consts/DelphiAIDev.Consts.pas

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,9 @@ TConsts = class
3333
//NAMES FILES .rtf
3434
FILE_RTF_CHAT = 'chat.rtf';
3535

36+
//NAMES FILE Database
37+
FILE_BD_DEFAULTS_QUESTIONS = 'delphi_ai_developer.db';
38+
3639
//ABOUT AND SPLASH
3740
ABOUT_TITLE = 'Delphi AI Developer';
3841
ABOUT_COPY_RIGHT = 'Copyright 2024 Code4Delphi Team.';
Lines changed: 191 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,191 @@
1+
object DelphiAIDevDefaultsQuestionsAddEditView: TDelphiAIDevDefaultsQuestionsAddEditView
2+
Left = 0
3+
Top = 0
4+
BorderIcons = [biSystemMenu]
5+
Caption = 'IA Developer - Defaults questions - [action]'
6+
ClientHeight = 350
7+
ClientWidth = 674
8+
Color = clBtnFace
9+
Font.Charset = DEFAULT_CHARSET
10+
Font.Color = clWindowText
11+
Font.Height = -11
12+
Font.Name = 'Tahoma'
13+
Font.Style = []
14+
KeyPreview = True
15+
OldCreateOrder = False
16+
Position = poScreenCenter
17+
OnCreate = FormCreate
18+
OnDestroy = FormDestroy
19+
OnKeyDown = FormKeyDown
20+
OnShow = FormShow
21+
PixelsPerInch = 96
22+
TextHeight = 13
23+
object Bevel2: TBevel
24+
AlignWithMargins = True
25+
Left = 0
26+
Top = 311
27+
Width = 674
28+
Height = 1
29+
Margins.Left = 0
30+
Margins.Top = 0
31+
Margins.Right = 0
32+
Align = alBottom
33+
Shape = bsTopLine
34+
ExplicitLeft = -5
35+
ExplicitTop = 476
36+
ExplicitWidth = 676
37+
end
38+
object Panel1: TPanel
39+
Left = 0
40+
Top = 315
41+
Width = 674
42+
Height = 35
43+
Align = alBottom
44+
BevelEdges = [beLeft, beRight, beBottom]
45+
BevelOuter = bvNone
46+
Padding.Left = 2
47+
Padding.Top = 2
48+
Padding.Right = 2
49+
Padding.Bottom = 2
50+
ParentBackground = False
51+
TabOrder = 0
52+
object btnConfirm: TButton
53+
AlignWithMargins = True
54+
Left = 446
55+
Top = 2
56+
Width = 110
57+
Height = 31
58+
Cursor = crHandPoint
59+
Margins.Left = 0
60+
Margins.Top = 0
61+
Margins.Bottom = 0
62+
Align = alRight
63+
Caption = 'Confirm'
64+
TabOrder = 0
65+
OnClick = btnConfirmClick
66+
end
67+
object btnClose: TButton
68+
AlignWithMargins = True
69+
Left = 559
70+
Top = 2
71+
Width = 110
72+
Height = 31
73+
Cursor = crHandPoint
74+
Margins.Left = 0
75+
Margins.Top = 0
76+
Margins.Bottom = 0
77+
Align = alRight
78+
Caption = 'Close'
79+
TabOrder = 1
80+
OnClick = btnCloseClick
81+
end
82+
end
83+
object Panel9: TPanel
84+
Left = 0
85+
Top = 0
86+
Width = 674
87+
Height = 311
88+
Align = alClient
89+
BevelOuter = bvNone
90+
ParentBackground = False
91+
TabOrder = 1
92+
DesignSize = (
93+
674
94+
311)
95+
object Label1: TLabel
96+
Left = 35
97+
Top = 54
98+
Width = 43
99+
Height = 13
100+
Caption = 'Question'
101+
end
102+
object Bevel1: TBevel
103+
AlignWithMargins = True
104+
Left = 0
105+
Top = 307
106+
Width = 674
107+
Height = 1
108+
Margins.Left = 0
109+
Margins.Top = 0
110+
Margins.Right = 0
111+
Align = alBottom
112+
Shape = bsTopLine
113+
ExplicitTop = 444
114+
ExplicitWidth = 676
115+
end
116+
object Label4: TLabel
117+
Left = 35
118+
Top = 191
119+
Width = 28
120+
Height = 13
121+
Caption = 'Order'
122+
end
123+
object Label9: TLabel
124+
Left = 34
125+
Top = 13
126+
Width = 62
127+
Height = 13
128+
Caption = 'Menu master'
129+
end
130+
object edtOrder: TEdit
131+
Left = 35
132+
Top = 206
133+
Width = 126
134+
Height = 21
135+
MaxLength = 4
136+
NumbersOnly = True
137+
TabOrder = 0
138+
Text = '0'
139+
end
140+
object UpDown1: TUpDown
141+
Left = 161
142+
Top = 206
143+
Width = 17
144+
Height = 21
145+
Cursor = crHandPoint
146+
Associate = edtOrder
147+
Max = 9999
148+
TabOrder = 1
149+
end
150+
object ckVisible: TCheckBox
151+
Left = 35
152+
Top = 238
153+
Width = 53
154+
Height = 17
155+
Cursor = crHandPoint
156+
Caption = 'Visible'
157+
TabOrder = 2
158+
end
159+
object ckCodeOnly: TCheckBox
160+
Left = 35
161+
Top = 261
162+
Width = 70
163+
Height = 17
164+
Cursor = crHandPoint
165+
Caption = 'Code Only'
166+
TabOrder = 3
167+
end
168+
object cBoxMenuMaster: TComboBox
169+
Left = 34
170+
Top = 28
171+
Width = 597
172+
Height = 21
173+
Margins.Left = 10
174+
Margins.Top = 15
175+
Margins.Right = 0
176+
Margins.Bottom = 0
177+
Style = csDropDownList
178+
Anchors = [akLeft, akTop, akRight]
179+
DropDownCount = 30
180+
TabOrder = 4
181+
end
182+
object mmQuestion: TMemo
183+
Left = 34
184+
Top = 70
185+
Width = 599
186+
Height = 116
187+
ScrollBars = ssVertical
188+
TabOrder = 5
189+
end
190+
end
191+
end

0 commit comments

Comments
 (0)