Skip to content

Commit

Permalink
Samples configuration lazarus with FormatTime and FormatDateTime #82
Browse files Browse the repository at this point in the history
  • Loading branch information
viniciussanchez committed Jan 26, 2021
1 parent d0ad5e2 commit 14893af
Show file tree
Hide file tree
Showing 2 changed files with 80 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,15 +38,15 @@ object FrmSamples: TFrmSamples
ClientWidth = 1000
TabOrder = 1
object Label1: TLabel
Left = 466
Left = 240
Height = 15
Top = 8
Width = 254
Caption = 'Format date (for export field type equals ftDate):'
ParentColor = False
end
object Label4: TLabel
Left = 466
Left = 240
Height = 15
Top = 56
Width = 301
Expand Down Expand Up @@ -87,15 +87,15 @@ object FrmSamples: TFrmSamples
TabOrder = 2
end
object edtFormatDate: TEdit
Left = 466
Left = 240
Height = 23
Top = 27
Width = 326
Width = 289
TabOrder = 3
Text = 'YYYY-MM-DD'
end
object btnApplyFormatDate: TButton
Left = 798
Left = 536
Height = 25
Top = 25
Width = 58
Expand All @@ -104,15 +104,15 @@ object FrmSamples: TFrmSamples
TabOrder = 4
end
object edtFormatCurrency: TEdit
Left = 466
Left = 240
Height = 23
Top = 75
Width = 326
Width = 289
TabOrder = 5
Text = '0.00##'
end
object btnFormatCurrency: TButton
Left = 798
Left = 536
Height = 25
Top = 73
Width = 58
Expand Down Expand Up @@ -155,18 +155,18 @@ object FrmSamples: TFrmSamples
TabOrder = 9
end
object Label2: TLabel
Left = 466
Left = 240
Height = 15
Top = 102
Width = 115
Caption = 'Case name definition:'
ParentColor = False
end
object cbxCaseNameDefinition: TComboBox
Left = 466
Left = 240
Height = 23
Top = 121
Width = 326
Width = 289
ItemHeight = 15
ItemIndex = 3
Items.Strings = (
Expand All @@ -180,14 +180,64 @@ object FrmSamples: TFrmSamples
Text = 'lowerCamelCase'
end
object btnCaseNameDefinition: TButton
Left = 798
Left = 536
Height = 25
Top = 119
Width = 58
Caption = 'Apply'
OnClick = btnCaseNameDefinitionClick
TabOrder = 11
end
object edtFormatDateTime: TEdit
Left = 608
Height = 23
Top = 75
Width = 289
TabOrder = 12
Text = 'yyyy-mm-dd hh:nn:ss.zzz'
end
object Label5: TLabel
Left = 608
Height = 15
Top = 56
Width = 307
Caption = 'Format DateTime (for export field type equals ftDateTime):'
ParentColor = False
end
object edtFormatTime: TEdit
Left = 608
Height = 23
Top = 27
Width = 289
TabOrder = 13
Text = 'hh:nn:ss.zzz'
end
object Label3: TLabel
Left = 608
Height = 15
Top = 8
Width = 257
Caption = 'Format time (for export field type equals ftTime):'
ParentColor = False
end
object btnApplyFormatTime: TButton
Left = 903
Height = 25
Top = 25
Width = 58
Caption = 'Apply'
OnClick = btnApplyFormatTimeClick
TabOrder = 14
end
object btnApplyFormatDateTime: TButton
Left = 903
Height = 25
Top = 73
Width = 58
Caption = 'Apply'
OnClick = btnApplyFormatDateTimeClick
TabOrder = 15
end
end
object Panel3: TPanel
Left = 0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ interface

TFrmSamples = class(TForm)
btnApplyFormatDate: TButton;
btnApplyFormatDateTime: TButton;
btnApplyFormatTime: TButton;
btnCaseNameDefinition: TButton;
btnFormatCurrency: TButton;
Button1: TButton;
Expand All @@ -31,9 +33,13 @@ TFrmSamples = class(TForm)
dsUsers: TDataSource;
edtFormatCurrency: TEdit;
edtFormatDate: TEdit;
edtFormatDateTime: TEdit;
edtFormatTime: TEdit;
Label1: TLabel;
Label2: TLabel;
Label3: TLabel;
Label4: TLabel;
Label5: TLabel;
mtUsers: TMemDataset;
mtLog: TMemDataset;
memoJSON: TMemo;
Expand All @@ -47,6 +53,8 @@ TFrmSamples = class(TForm)
Panel8: TPanel;
Panel9: TPanel;
procedure btnApplyFormatDateClick(Sender: TObject);
procedure btnApplyFormatDateTimeClick(Sender: TObject);
procedure btnApplyFormatTimeClick(Sender: TObject);
procedure btnCaseNameDefinitionClick(Sender: TObject);
procedure btnFormatCurrencyClick(Sender: TObject);
procedure Button1Click(Sender: TObject);
Expand Down Expand Up @@ -84,6 +92,16 @@ procedure TFrmSamples.btnApplyFormatDateClick(Sender: TObject);
TDataSetSerializeConfig.GetInstance.Export.FormatDate := edtFormatDate.Text;
end;

procedure TFrmSamples.btnApplyFormatDateTimeClick(Sender: TObject);
begin
TDataSetSerializeConfig.GetInstance.Export.FormatDateTime := edtFormatDateTime.Text;
end;

procedure TFrmSamples.btnApplyFormatTimeClick(Sender: TObject);
begin
TDataSetSerializeConfig.GetInstance.Export.FormatTime := edtFormatTime.Text;
end;

procedure TFrmSamples.btnCaseNameDefinitionClick(Sender: TObject);
begin
TDataSetSerializeConfig.GetInstance.CaseNameDefinition := TCaseNameDefinition(cbxCaseNameDefinition.ItemIndex);
Expand Down

0 comments on commit 14893af

Please sign in to comment.