You've already forked lazarus-ccr
RxFPC:fix RxDateRangeEdit property Period and PeriodEnd for reoQuarter, reoHalfYear
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@5892 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<CONFIG>
|
||||
<ProjectOptions>
|
||||
<Version Value="9"/>
|
||||
<Version Value="10"/>
|
||||
<General>
|
||||
<MainUnit Value="0"/>
|
||||
<ResourceType Value="res"/>
|
||||
@ -27,25 +27,28 @@
|
||||
<LaunchingApplication PathPlusParams="/usr/X11R6/bin/xterm -T 'Lazarus Run Output' -e $(LazarusDir)/tools/runwait.sh $(TargetCmdLine)"/>
|
||||
</local>
|
||||
</RunParams>
|
||||
<RequiredPackages Count="3">
|
||||
<RequiredPackages Count="4">
|
||||
<Item1>
|
||||
<PackageName Value="rxnew"/>
|
||||
<MinVersion Major="2" Minor="1" Release="1" Build="103" Valid="True"/>
|
||||
<PackageName Value="LazControls"/>
|
||||
</Item1>
|
||||
<Item2>
|
||||
<PackageName Value="FCL"/>
|
||||
<MinVersion Major="1" Valid="True"/>
|
||||
<PackageName Value="rxnew"/>
|
||||
<MinVersion Major="2" Minor="1" Release="1" Build="103" Valid="True"/>
|
||||
</Item2>
|
||||
<Item3>
|
||||
<PackageName Value="LCL"/>
|
||||
<PackageName Value="FCL"/>
|
||||
<MinVersion Major="1" Valid="True"/>
|
||||
</Item3>
|
||||
<Item4>
|
||||
<PackageName Value="LCL"/>
|
||||
</Item4>
|
||||
</RequiredPackages>
|
||||
<Units Count="23">
|
||||
<Units Count="24">
|
||||
<Unit0>
|
||||
<Filename Value="project1.lpr"/>
|
||||
<IsPartOfProject Value="True"/>
|
||||
<CursorPos Y="14"/>
|
||||
<UsageCount Value="20"/>
|
||||
<UsageCount Value="21"/>
|
||||
</Unit0>
|
||||
<Unit1>
|
||||
<Filename Value="unit1.pas"/>
|
||||
@ -55,8 +58,9 @@
|
||||
<ResourceBaseClass Value="Form"/>
|
||||
<UnitName Value="Unit1"/>
|
||||
<IsVisibleTab Value="True"/>
|
||||
<CursorPos X="59" Y="9"/>
|
||||
<UsageCount Value="20"/>
|
||||
<TopLine Value="55"/>
|
||||
<CursorPos Y="83"/>
|
||||
<UsageCount Value="21"/>
|
||||
<Loaded Value="True"/>
|
||||
<LoadedDesigner Value="True"/>
|
||||
</Unit1>
|
||||
@ -197,88 +201,137 @@
|
||||
<CursorPos Y="48"/>
|
||||
<UsageCount Value="10"/>
|
||||
</Unit22>
|
||||
<Unit23>
|
||||
<Filename Value="../../rxcontrols/rxdaterangeeditunit.pas"/>
|
||||
<UnitName Value="rxDateRangeEditUnit"/>
|
||||
<EditorIndex Value="1"/>
|
||||
<TopLine Value="337"/>
|
||||
<CursorPos Y="359"/>
|
||||
<UsageCount Value="10"/>
|
||||
<Loaded Value="True"/>
|
||||
</Unit23>
|
||||
</Units>
|
||||
<JumpHistory Count="20" HistoryIndex="19">
|
||||
<JumpHistory Count="30" HistoryIndex="29">
|
||||
<Position1>
|
||||
<Filename Value="unit1.pas"/>
|
||||
<Caret Line="46" TopLine="28"/>
|
||||
<Caret Line="62" Column="5" TopLine="42"/>
|
||||
</Position1>
|
||||
<Position2>
|
||||
<Filename Value="unit1.pas"/>
|
||||
<Caret Line="18" Column="22" TopLine="8"/>
|
||||
<Caret Line="63" Column="5" TopLine="43"/>
|
||||
</Position2>
|
||||
<Position3>
|
||||
<Filename Value="unit1.pas"/>
|
||||
<Caret Line="46" TopLine="28"/>
|
||||
<Caret Line="64" Column="5" TopLine="44"/>
|
||||
</Position3>
|
||||
<Position4>
|
||||
<Filename Value="unit1.pas"/>
|
||||
<Caret Line="47" TopLine="28"/>
|
||||
<Caret Line="65" Column="5" TopLine="45"/>
|
||||
</Position4>
|
||||
<Position5>
|
||||
<Filename Value="unit1.pas"/>
|
||||
<Caret Line="46" Column="26" TopLine="28"/>
|
||||
<Caret Line="66" Column="5" TopLine="46"/>
|
||||
</Position5>
|
||||
<Position6>
|
||||
<Filename Value="unit1.pas"/>
|
||||
<Caret Line="20" Column="25" TopLine="20"/>
|
||||
<Caret Line="68" Column="51" TopLine="47"/>
|
||||
</Position6>
|
||||
<Position7>
|
||||
<Filename Value="unit1.pas"/>
|
||||
<Caret Line="22" Column="20" TopLine="20"/>
|
||||
<Filename Value="../../rxcontrols/rxdaterangeeditunit.pas"/>
|
||||
<Caret Line="420" Column="66" TopLine="401"/>
|
||||
</Position7>
|
||||
<Position8>
|
||||
<Filename Value="unit1.pas"/>
|
||||
<Caret Line="9" Column="22" TopLine="9"/>
|
||||
<Caret Line="64" Column="24" TopLine="47"/>
|
||||
</Position8>
|
||||
<Position9>
|
||||
<Filename Value="unit1.pas"/>
|
||||
<Caret Line="39" TopLine="22"/>
|
||||
<Filename Value="../../rxcontrols/rxdaterangeeditunit.pas"/>
|
||||
<Caret Line="384" Column="25" TopLine="364"/>
|
||||
</Position9>
|
||||
<Position10>
|
||||
<Filename Value="unit1.pas"/>
|
||||
<Caret Line="38" TopLine="22"/>
|
||||
<Filename Value="../../rxcontrols/rxdaterangeeditunit.pas"/>
|
||||
<Caret Line="71" Column="15" TopLine="68"/>
|
||||
</Position10>
|
||||
<Position11>
|
||||
<Filename Value="unit1.pas"/>
|
||||
<Caret Line="40" Column="7" TopLine="22"/>
|
||||
<Filename Value="../../rxcontrols/rxdaterangeeditunit.pas"/>
|
||||
<Caret Line="297" Column="5" TopLine="281"/>
|
||||
</Position11>
|
||||
<Position12>
|
||||
<Filename Value="unit1.pas"/>
|
||||
<Caret Line="39" Column="7" TopLine="21"/>
|
||||
<Filename Value="../../rxcontrols/rxdaterangeeditunit.pas"/>
|
||||
<Caret Line="296" Column="22" TopLine="279"/>
|
||||
</Position12>
|
||||
<Position13>
|
||||
<Filename Value="unit1.pas"/>
|
||||
<Caret Line="40" Column="7" TopLine="21"/>
|
||||
<Filename Value="../../rxcontrols/rxdaterangeeditunit.pas"/>
|
||||
<Caret Line="290" Column="25" TopLine="274"/>
|
||||
</Position13>
|
||||
<Position14>
|
||||
<Filename Value="unit1.pas"/>
|
||||
<Caret Line="39" Column="7" TopLine="21"/>
|
||||
<Filename Value="../../rxcontrols/rxdaterangeeditunit.pas"/>
|
||||
<Caret Line="286" Column="5" TopLine="261"/>
|
||||
</Position14>
|
||||
<Position15>
|
||||
<Filename Value="unit1.pas"/>
|
||||
<Caret Line="18" Column="15" TopLine="6"/>
|
||||
<Filename Value="../../rxcontrols/rxdaterangeeditunit.pas"/>
|
||||
<Caret Line="283" TopLine="261"/>
|
||||
</Position15>
|
||||
<Position16>
|
||||
<Filename Value="unit1.pas"/>
|
||||
<Caret Line="18" Column="15" TopLine="6"/>
|
||||
<Filename Value="../../rxcontrols/rxdaterangeeditunit.pas"/>
|
||||
<Caret Line="285" TopLine="261"/>
|
||||
</Position16>
|
||||
<Position17>
|
||||
<Filename Value="unit1.pas"/>
|
||||
<Caret Line="13" Column="26" TopLine="6"/>
|
||||
<Filename Value="../../rxcontrols/rxdaterangeeditunit.pas"/>
|
||||
<Caret Line="286" TopLine="261"/>
|
||||
</Position17>
|
||||
<Position18>
|
||||
<Filename Value="unit1.pas"/>
|
||||
<Caret Line="18" Column="18"/>
|
||||
<Filename Value="../../rxcontrols/rxdaterangeeditunit.pas"/>
|
||||
<Caret Line="289" TopLine="284"/>
|
||||
</Position18>
|
||||
<Position19>
|
||||
<Filename Value="unit1.pas"/>
|
||||
<Caret Line="17" Column="34"/>
|
||||
<Filename Value="../../rxcontrols/rxdaterangeeditunit.pas"/>
|
||||
<Caret Line="266" Column="18" TopLine="264"/>
|
||||
</Position19>
|
||||
<Position20>
|
||||
<Filename Value="unit1.pas"/>
|
||||
<Caret Line="9" Column="33"/>
|
||||
<Filename Value="../../rxcontrols/rxdaterangeeditunit.pas"/>
|
||||
<Caret Line="283" TopLine="264"/>
|
||||
</Position20>
|
||||
<Position21>
|
||||
<Filename Value="../../rxcontrols/rxdaterangeeditunit.pas"/>
|
||||
<Caret Line="289" TopLine="264"/>
|
||||
</Position21>
|
||||
<Position22>
|
||||
<Filename Value="../../rxcontrols/rxdaterangeeditunit.pas"/>
|
||||
<Caret Line="294" TopLine="264"/>
|
||||
</Position22>
|
||||
<Position23>
|
||||
<Filename Value="../../rxcontrols/rxdaterangeeditunit.pas"/>
|
||||
<Caret Line="307" TopLine="288"/>
|
||||
</Position23>
|
||||
<Position24>
|
||||
<Filename Value="../../rxcontrols/rxdaterangeeditunit.pas"/>
|
||||
<Caret Line="312" TopLine="288"/>
|
||||
</Position24>
|
||||
<Position25>
|
||||
<Filename Value="unit1.pas"/>
|
||||
<Caret Line="62" Column="32" TopLine="55"/>
|
||||
</Position25>
|
||||
<Position26>
|
||||
<Filename Value="unit1.pas"/>
|
||||
<Caret Line="88" TopLine="55"/>
|
||||
</Position26>
|
||||
<Position27>
|
||||
<Filename Value="../../rxcontrols/rxdaterangeeditunit.pas"/>
|
||||
<Caret Line="356" TopLine="337"/>
|
||||
</Position27>
|
||||
<Position28>
|
||||
<Filename Value="unit1.pas"/>
|
||||
<Caret Line="86" Column="15" TopLine="55"/>
|
||||
</Position28>
|
||||
<Position29>
|
||||
<Filename Value="unit1.pas"/>
|
||||
<Caret Line="88" TopLine="55"/>
|
||||
</Position29>
|
||||
<Position30>
|
||||
<Filename Value="unit1.pas"/>
|
||||
<Caret Line="82" Column="9" TopLine="55"/>
|
||||
</Position30>
|
||||
</JumpHistory>
|
||||
</ProjectOptions>
|
||||
<CompilerOptions>
|
||||
|
@ -7,7 +7,7 @@ uses
|
||||
cthreads,
|
||||
{$ENDIF}{$ENDIF}
|
||||
Interfaces, // this includes the LCL widgetset
|
||||
Forms,
|
||||
Forms, lazcontrols,
|
||||
Unit1,
|
||||
sysutils
|
||||
{ you can add units after this };
|
||||
|
@ -1,99 +1,241 @@
|
||||
object Form1: TForm1
|
||||
Left = 608
|
||||
Height = 300
|
||||
Top = 495
|
||||
Width = 400
|
||||
Left = 502
|
||||
Height = 397
|
||||
Top = 390
|
||||
Width = 590
|
||||
Caption = 'Form1'
|
||||
ClientHeight = 300
|
||||
ClientWidth = 400
|
||||
ClientHeight = 397
|
||||
ClientWidth = 590
|
||||
OnCreate = FormCreate
|
||||
LCLVersion = '1.7'
|
||||
object Label1: TLabel
|
||||
AnchorSideLeft.Control = Owner
|
||||
AnchorSideTop.Control = Owner
|
||||
Left = 6
|
||||
Height = 20
|
||||
Top = 6
|
||||
Width = 42
|
||||
BorderSpacing.Left = 6
|
||||
BorderSpacing.Top = 6
|
||||
Caption = 'Label1'
|
||||
ParentColor = False
|
||||
end
|
||||
object Label2: TLabel
|
||||
AnchorSideLeft.Control = Owner
|
||||
AnchorSideTop.Control = RxDBDateEdit1
|
||||
AnchorSideTop.Side = asrBottom
|
||||
Left = 6
|
||||
Height = 20
|
||||
Top = 75
|
||||
Width = 87
|
||||
BorderSpacing.Around = 6
|
||||
Caption = 'Currency edit'
|
||||
ParentColor = False
|
||||
end
|
||||
object CurrencyEdit1: TCurrencyEdit
|
||||
AnchorSideLeft.Control = Label2
|
||||
AnchorSideTop.Control = Label2
|
||||
AnchorSideTop.Side = asrBottom
|
||||
Left = 12
|
||||
Height = 37
|
||||
Top = 101
|
||||
Width = 148
|
||||
Alignment = taCenter
|
||||
BorderSpacing.Around = 6
|
||||
MaxValue = 0
|
||||
MinValue = 0
|
||||
LCLVersion = '1.9.0.0'
|
||||
object PageControl1: TPageControl
|
||||
Left = 0
|
||||
Height = 397
|
||||
Top = 0
|
||||
Width = 590
|
||||
ActivePage = TabSheet2
|
||||
Align = alClient
|
||||
TabIndex = 1
|
||||
TabOrder = 0
|
||||
Value = 0
|
||||
end
|
||||
object Button1: TButton
|
||||
Left = 248
|
||||
Height = 36
|
||||
Top = 80
|
||||
Width = 77
|
||||
AutoSize = True
|
||||
Caption = 'Invalidate'
|
||||
OnClick = Button1Click
|
||||
TabOrder = 1
|
||||
end
|
||||
object RxDateEdit1: TRxDateEdit
|
||||
Left = 12
|
||||
Height = 37
|
||||
Top = 160
|
||||
Width = 80
|
||||
ButtonWidth = 23
|
||||
MaxLength = 10
|
||||
NumGlyphs = 2
|
||||
PasswordChar = #0
|
||||
PopupColor = clWindow
|
||||
TabOrder = 2
|
||||
Text = ' . . '
|
||||
end
|
||||
object RxDBDateEdit1: TRxDBDateEdit
|
||||
AnchorSideLeft.Control = Label1
|
||||
AnchorSideTop.Control = Label1
|
||||
AnchorSideTop.Side = asrBottom
|
||||
Left = 12
|
||||
Height = 37
|
||||
Top = 32
|
||||
Width = 151
|
||||
BorderSpacing.Around = 6
|
||||
ButtonWidth = 23
|
||||
Enabled = False
|
||||
MaxLength = 10
|
||||
NumGlyphs = 2
|
||||
PasswordChar = #0
|
||||
PopupColor = clWindow
|
||||
TabOrder = 3
|
||||
Text = 't1. . '
|
||||
DataField = 'DOC_DATE'
|
||||
DataSource = dsData
|
||||
object TabSheet1: TTabSheet
|
||||
Caption = 'RxDBDateEdit demo'
|
||||
ClientHeight = 363
|
||||
ClientWidth = 580
|
||||
object Label1: TLabel
|
||||
AnchorSideLeft.Control = Owner
|
||||
AnchorSideTop.Control = Owner
|
||||
Left = 6
|
||||
Height = 20
|
||||
Top = 6
|
||||
Width = 42
|
||||
Caption = 'Label1'
|
||||
ParentColor = False
|
||||
end
|
||||
object RxDBDateEdit1: TRxDBDateEdit
|
||||
AnchorSideLeft.Control = Label1
|
||||
AnchorSideTop.Control = Label1
|
||||
AnchorSideTop.Side = asrBottom
|
||||
Left = 12
|
||||
Height = 37
|
||||
Top = 32
|
||||
Width = 151
|
||||
BorderSpacing.Around = 6
|
||||
ButtonWidth = 23
|
||||
Enabled = False
|
||||
MaxLength = 10
|
||||
NumGlyphs = 2
|
||||
PasswordChar = #0
|
||||
PopupColor = clWindow
|
||||
TabOrder = 0
|
||||
Text = 't1. . '
|
||||
DataField = 'DOC_DATE'
|
||||
DataSource = dsData
|
||||
end
|
||||
object Label2: TLabel
|
||||
AnchorSideLeft.Control = Owner
|
||||
AnchorSideTop.Control = RxDBDateEdit1
|
||||
AnchorSideTop.Side = asrBottom
|
||||
Left = 6
|
||||
Height = 20
|
||||
Top = 75
|
||||
Width = 85
|
||||
BorderSpacing.Around = 6
|
||||
Caption = 'Currency edit'
|
||||
ParentColor = False
|
||||
end
|
||||
object CurrencyEdit1: TCurrencyEdit
|
||||
AnchorSideLeft.Control = Label2
|
||||
AnchorSideTop.Control = Label2
|
||||
AnchorSideTop.Side = asrBottom
|
||||
Left = 12
|
||||
Height = 37
|
||||
Top = 101
|
||||
Width = 148
|
||||
Alignment = taCenter
|
||||
BorderSpacing.Around = 6
|
||||
MaxValue = 0
|
||||
MinValue = 0
|
||||
TabOrder = 1
|
||||
Value = 0
|
||||
end
|
||||
object RxDateEdit1: TRxDateEdit
|
||||
Left = 12
|
||||
Height = 37
|
||||
Top = 160
|
||||
Width = 80
|
||||
ButtonWidth = 23
|
||||
MaxLength = 10
|
||||
NumGlyphs = 2
|
||||
PasswordChar = #0
|
||||
PopupColor = clWindow
|
||||
TabOrder = 2
|
||||
Text = ' . . '
|
||||
end
|
||||
object Button1: TButton
|
||||
Left = 248
|
||||
Height = 36
|
||||
Top = 80
|
||||
Width = 77
|
||||
AutoSize = True
|
||||
Caption = 'Invalidate'
|
||||
OnClick = Button1Click
|
||||
TabOrder = 3
|
||||
end
|
||||
end
|
||||
object TabSheet2: TTabSheet
|
||||
Caption = 'RxDateRangeEdit demo'
|
||||
ClientHeight = 363
|
||||
ClientWidth = 580
|
||||
object CheckBox1: TCheckBox
|
||||
AnchorSideLeft.Control = TabSheet2
|
||||
AnchorSideTop.Control = TabSheet2
|
||||
Left = 6
|
||||
Height = 24
|
||||
Top = 6
|
||||
Width = 88
|
||||
BorderSpacing.Around = 6
|
||||
Caption = 'reoMonth'
|
||||
Checked = True
|
||||
OnChange = CheckBox1Change
|
||||
State = cbChecked
|
||||
TabOrder = 0
|
||||
end
|
||||
object RxDateRangeEdit1: TRxDateRangeEdit
|
||||
AnchorSideLeft.Control = TabSheet2
|
||||
AnchorSideLeft.Side = asrCenter
|
||||
AnchorSideTop.Control = CheckBox3
|
||||
AnchorSideTop.Side = asrBottom
|
||||
Left = 159
|
||||
Height = 37
|
||||
Top = 96
|
||||
Width = 262
|
||||
BorderSpacing.Around = 6
|
||||
Month = 5
|
||||
TabOrder = 1
|
||||
Year = 2017
|
||||
OnChange = RxDateRangeEdit1Change
|
||||
end
|
||||
object CheckBox2: TCheckBox
|
||||
AnchorSideLeft.Control = TabSheet2
|
||||
AnchorSideTop.Control = CheckBox1
|
||||
AnchorSideTop.Side = asrBottom
|
||||
Left = 6
|
||||
Height = 24
|
||||
Top = 36
|
||||
Width = 96
|
||||
BorderSpacing.Around = 6
|
||||
Caption = 'reoQuarter'
|
||||
Checked = True
|
||||
OnChange = CheckBox1Change
|
||||
State = cbChecked
|
||||
TabOrder = 2
|
||||
end
|
||||
object CheckBox3: TCheckBox
|
||||
AnchorSideLeft.Control = TabSheet2
|
||||
AnchorSideTop.Control = CheckBox2
|
||||
AnchorSideTop.Side = asrBottom
|
||||
Left = 6
|
||||
Height = 24
|
||||
Top = 66
|
||||
Width = 102
|
||||
BorderSpacing.Around = 6
|
||||
Caption = 'reoHalfYear'
|
||||
Checked = True
|
||||
OnChange = CheckBox1Change
|
||||
State = cbChecked
|
||||
TabOrder = 3
|
||||
end
|
||||
object Label3: TLabel
|
||||
AnchorSideLeft.Control = TabSheet2
|
||||
AnchorSideTop.Control = RxDateRangeEdit1
|
||||
AnchorSideTop.Side = asrBottom
|
||||
Left = 6
|
||||
Height = 20
|
||||
Top = 139
|
||||
Width = 92
|
||||
BorderSpacing.Around = 6
|
||||
Caption = 'Start of period'
|
||||
ParentColor = False
|
||||
end
|
||||
object Edit1: TEdit
|
||||
AnchorSideLeft.Control = Label3
|
||||
AnchorSideTop.Control = Label3
|
||||
AnchorSideTop.Side = asrBottom
|
||||
AnchorSideRight.Control = Label5
|
||||
Left = 12
|
||||
Height = 37
|
||||
Top = 165
|
||||
Width = 272
|
||||
Anchors = [akTop, akLeft, akRight]
|
||||
BorderSpacing.Around = 6
|
||||
ReadOnly = True
|
||||
TabOrder = 4
|
||||
Text = 'Edit1'
|
||||
end
|
||||
object Label4: TLabel
|
||||
AnchorSideLeft.Control = Label5
|
||||
AnchorSideTop.Control = RxDateRangeEdit1
|
||||
AnchorSideTop.Side = asrBottom
|
||||
Left = 296
|
||||
Height = 20
|
||||
Top = 139
|
||||
Width = 85
|
||||
BorderSpacing.Around = 6
|
||||
Caption = 'End of period'
|
||||
ParentColor = False
|
||||
end
|
||||
object Edit2: TEdit
|
||||
AnchorSideLeft.Control = Label4
|
||||
AnchorSideTop.Control = Label4
|
||||
AnchorSideTop.Side = asrBottom
|
||||
AnchorSideRight.Control = TabSheet2
|
||||
AnchorSideRight.Side = asrBottom
|
||||
Left = 302
|
||||
Height = 37
|
||||
Top = 165
|
||||
Width = 272
|
||||
Anchors = [akTop, akLeft, akRight]
|
||||
BorderSpacing.Around = 6
|
||||
ReadOnly = True
|
||||
TabOrder = 5
|
||||
Text = 'Edit2'
|
||||
end
|
||||
object Label5: TLabel
|
||||
AnchorSideLeft.Control = TabSheet2
|
||||
AnchorSideLeft.Side = asrCenter
|
||||
AnchorSideTop.Control = TabSheet2
|
||||
Left = 290
|
||||
Height = 1
|
||||
Top = 0
|
||||
Width = 1
|
||||
ParentColor = False
|
||||
end
|
||||
end
|
||||
end
|
||||
object dsData: TDataSource
|
||||
DataSet = rxData
|
||||
left = 264
|
||||
top = 21
|
||||
Left = 264
|
||||
Top = 21
|
||||
end
|
||||
object rxData: TRxMemoryData
|
||||
FieldDefs = <
|
||||
@ -102,8 +244,8 @@ object Form1: TForm1
|
||||
DataType = ftDate
|
||||
end>
|
||||
PacketRecords = 0
|
||||
left = 304
|
||||
top = 21
|
||||
Left = 304
|
||||
Top = 21
|
||||
object rxDataDOC_DATE: TDateField
|
||||
DisplayWidth = 10
|
||||
FieldKind = fkData
|
||||
|
@ -5,8 +5,9 @@ unit Unit1;
|
||||
interface
|
||||
|
||||
uses
|
||||
Classes, SysUtils, db, FileUtil, LResources, Forms, Controls, Graphics,
|
||||
Dialogs, StdCtrls, rxmemds, rxdbdateedit, rxcurredit, rxtooledit;
|
||||
Classes, SysUtils, db, FileUtil, DividerBevel, LResources, Forms, Controls,
|
||||
Graphics, Dialogs, StdCtrls, ComCtrls, rxmemds, rxdbdateedit, rxcurredit,
|
||||
rxtooledit, rxDateRangeEditUnit;
|
||||
|
||||
type
|
||||
|
||||
@ -14,16 +15,30 @@ type
|
||||
|
||||
TForm1 = class(TForm)
|
||||
Button1: TButton;
|
||||
CheckBox1: TCheckBox;
|
||||
CheckBox2: TCheckBox;
|
||||
CheckBox3: TCheckBox;
|
||||
CurrencyEdit1: TCurrencyEdit;
|
||||
dsData: TDatasource;
|
||||
Edit1: TEdit;
|
||||
Edit2: TEdit;
|
||||
Label1: TLabel;
|
||||
Label2: TLabel;
|
||||
Label3: TLabel;
|
||||
Label4: TLabel;
|
||||
Label5: TLabel;
|
||||
PageControl1: TPageControl;
|
||||
rxData: TRxMemoryData;
|
||||
rxDataDOC_DATE: TDateField;
|
||||
RxDateEdit1: TRxDateEdit;
|
||||
RxDateRangeEdit1: TRxDateRangeEdit;
|
||||
RxDBDateEdit1: TRxDBDateEdit;
|
||||
TabSheet1: TTabSheet;
|
||||
TabSheet2: TTabSheet;
|
||||
procedure Button1Click(Sender: TObject);
|
||||
procedure CheckBox1Change(Sender: TObject);
|
||||
procedure FormCreate(Sender: TObject);
|
||||
procedure RxDateRangeEdit1Change(Sender: TObject);
|
||||
private
|
||||
{ private declarations }
|
||||
public
|
||||
@ -44,7 +59,15 @@ begin
|
||||
rxData.Open;
|
||||
rxData.Append;
|
||||
rxDataDOC_DATE.AsDateTime:=Now;
|
||||
CurrencyEdit1.Value:=1214.55
|
||||
CurrencyEdit1.Value:=1214.55;
|
||||
|
||||
CheckBox1Change(nil);
|
||||
end;
|
||||
|
||||
procedure TForm1.RxDateRangeEdit1Change(Sender: TObject);
|
||||
begin
|
||||
Edit1.Text:=DateToStr(RxDateRangeEdit1.Period);
|
||||
Edit2.Text:=DateToStr(RxDateRangeEdit1.PeriodEnd);
|
||||
end;
|
||||
|
||||
procedure TForm1.Button1Click(Sender: TObject);
|
||||
@ -52,5 +75,19 @@ begin
|
||||
CurrencyEdit1.Invalidate;
|
||||
end;
|
||||
|
||||
procedure TForm1.CheckBox1Change(Sender: TObject);
|
||||
var
|
||||
R: TRxDateRangeEditOptions;
|
||||
begin
|
||||
R:=[];
|
||||
if CheckBox1.Checked then
|
||||
R:=R + [reoMonth];
|
||||
if CheckBox2.Checked then
|
||||
R:=R + [reoQuarter];
|
||||
if CheckBox3.Checked then
|
||||
R:=R + [reoHalfYear];
|
||||
RxDateRangeEdit1.Options:=R;
|
||||
end;
|
||||
|
||||
end.
|
||||
|
||||
|
@ -30,8 +30,8 @@
|
||||
<Filename Value="../../../rxdb/rxdbgrid.pas"/>
|
||||
<IsVisibleTab Value="True"/>
|
||||
<EditorIndex Value="1"/>
|
||||
<TopLine Value="1174"/>
|
||||
<CursorPos X="42" Y="1187"/>
|
||||
<TopLine Value="504"/>
|
||||
<CursorPos X="20" Y="518"/>
|
||||
<UsageCount Value="16"/>
|
||||
<Bookmarks Count="4">
|
||||
<Item0 X="7" Y="4721" ID="3"/>
|
||||
@ -44,7 +44,7 @@
|
||||
<Unit3>
|
||||
<Filename Value="../../../../../lcl/dbgrids.pas"/>
|
||||
<UnitName Value="DBGrids"/>
|
||||
<EditorIndex Value="5"/>
|
||||
<EditorIndex Value="4"/>
|
||||
<TopLine Value="2880"/>
|
||||
<CursorPos Y="2901"/>
|
||||
<UsageCount Value="16"/>
|
||||
@ -53,7 +53,7 @@
|
||||
<Unit4>
|
||||
<Filename Value="../../../../../lcl/grids.pas"/>
|
||||
<UnitName Value="Grids"/>
|
||||
<EditorIndex Value="6"/>
|
||||
<EditorIndex Value="5"/>
|
||||
<TopLine Value="2482"/>
|
||||
<CursorPos X="3" Y="2484"/>
|
||||
<UsageCount Value="16"/>
|
||||
@ -61,7 +61,7 @@
|
||||
</Unit4>
|
||||
<Unit5>
|
||||
<Filename Value="/home/install/source/fpcsrc/packages/fcl-db/src/base/db.pas"/>
|
||||
<EditorIndex Value="4"/>
|
||||
<EditorIndex Value="3"/>
|
||||
<TopLine Value="1560"/>
|
||||
<CursorPos X="15" Y="1578"/>
|
||||
<UsageCount Value="16"/>
|
||||
@ -97,15 +97,14 @@
|
||||
</Unit9>
|
||||
<Unit10>
|
||||
<Filename Value="/home/install/source/fpcsrc/rtl/objpas/classes/classesh.inc"/>
|
||||
<EditorIndex Value="2"/>
|
||||
<TopLine Value="518"/>
|
||||
<CursorPos X="14" Y="537"/>
|
||||
<EditorIndex Value="-1"/>
|
||||
<TopLine Value="473"/>
|
||||
<CursorPos X="3" Y="480"/>
|
||||
<UsageCount Value="10"/>
|
||||
<Loaded Value="True"/>
|
||||
</Unit10>
|
||||
<Unit11>
|
||||
<Filename Value="/home/install/source/fpcsrc/rtl/objpas/classes/collect.inc"/>
|
||||
<EditorIndex Value="3"/>
|
||||
<EditorIndex Value="2"/>
|
||||
<TopLine Value="289"/>
|
||||
<CursorPos X="3" Y="291"/>
|
||||
<UsageCount Value="10"/>
|
||||
@ -115,123 +114,123 @@
|
||||
<JumpHistory Count="30" HistoryIndex="29">
|
||||
<Position1>
|
||||
<Filename Value="../../../rxdb/rxdbgrid.pas"/>
|
||||
<Caret Line="503" Column="9" TopLine="484"/>
|
||||
<Caret Line="6448" Column="54" TopLine="6435"/>
|
||||
</Position1>
|
||||
<Position2>
|
||||
<Filename Value="../../../rxdb/rxdbgrid.pas"/>
|
||||
<Caret Line="1174" Column="17" TopLine="1171"/>
|
||||
<Caret Line="5032" Column="9" TopLine="5000"/>
|
||||
</Position2>
|
||||
<Position3>
|
||||
<Filename Value="../../../rxdb/rxdbgrid.pas"/>
|
||||
<Caret Line="6448" Column="54" TopLine="6435"/>
|
||||
<Caret Line="4943" Column="17" TopLine="4928"/>
|
||||
</Position3>
|
||||
<Position4>
|
||||
<Filename Value="../../../rxdb/rxdbgrid.pas"/>
|
||||
<Caret Line="5032" Column="9" TopLine="5000"/>
|
||||
<Caret Line="5053" Column="3" TopLine="5021"/>
|
||||
</Position4>
|
||||
<Position5>
|
||||
<Filename Value="../../../rxdb/rxdbgrid.pas"/>
|
||||
<Caret Line="4943" Column="17" TopLine="4928"/>
|
||||
<Caret Line="5058" TopLine="5024"/>
|
||||
</Position5>
|
||||
<Position6>
|
||||
<Filename Value="../../../rxdb/rxdbgrid.pas"/>
|
||||
<Caret Line="5053" Column="3" TopLine="5021"/>
|
||||
<Caret Line="5051" Column="35" TopLine="5041"/>
|
||||
</Position6>
|
||||
<Position7>
|
||||
<Filename Value="../../../rxdb/rxdbgrid.pas"/>
|
||||
<Caret Line="5058" TopLine="5024"/>
|
||||
<Caret Line="796" Column="15" TopLine="780"/>
|
||||
</Position7>
|
||||
<Position8>
|
||||
<Filename Value="../../../rxdb/rxdbgrid.pas"/>
|
||||
<Caret Line="5051" Column="35" TopLine="5041"/>
|
||||
<Caret Line="362" Column="49" TopLine="342"/>
|
||||
</Position8>
|
||||
<Position9>
|
||||
<Filename Value="../../../rxdb/rxdbgrid.pas"/>
|
||||
<Caret Line="796" Column="15" TopLine="780"/>
|
||||
<Caret Line="589" TopLine="570"/>
|
||||
</Position9>
|
||||
<Position10>
|
||||
<Filename Value="../../../rxdb/rxdbgrid.pas"/>
|
||||
<Caret Line="362" Column="49" TopLine="342"/>
|
||||
<Caret Line="362" Column="49" TopLine="343"/>
|
||||
</Position10>
|
||||
<Position11>
|
||||
<Filename Value="../../../rxdb/rxdbgrid.pas"/>
|
||||
<Caret Line="589" TopLine="570"/>
|
||||
<Caret Line="5042" Column="33" TopLine="5037"/>
|
||||
</Position11>
|
||||
<Position12>
|
||||
<Filename Value="../../../rxdb/rxdbgrid.pas"/>
|
||||
<Caret Line="362" Column="49" TopLine="343"/>
|
||||
<Caret Line="5116" Column="40" TopLine="5038"/>
|
||||
</Position12>
|
||||
<Position13>
|
||||
<Filename Value="../../../rxdb/rxdbgrid.pas"/>
|
||||
<Caret Line="5042" Column="33" TopLine="5037"/>
|
||||
<Caret Line="515" Column="48" TopLine="490"/>
|
||||
</Position13>
|
||||
<Position14>
|
||||
<Filename Value="../../../rxdb/rxdbgrid.pas"/>
|
||||
<Caret Line="5116" Column="40" TopLine="5038"/>
|
||||
<Caret Line="522" Column="21" TopLine="496"/>
|
||||
</Position14>
|
||||
<Position15>
|
||||
<Filename Value="../../../rxdb/rxdbgrid.pas"/>
|
||||
<Caret Line="515" Column="48" TopLine="490"/>
|
||||
<Caret Line="525" Column="76" TopLine="493"/>
|
||||
</Position15>
|
||||
<Position16>
|
||||
<Filename Value="../../../rxdb/rxdbgrid.pas"/>
|
||||
<Caret Line="522" Column="21" TopLine="496"/>
|
||||
<Caret Line="1173" TopLine="1168"/>
|
||||
</Position16>
|
||||
<Position17>
|
||||
<Filename Value="../../../rxdb/rxdbgrid.pas"/>
|
||||
<Caret Line="525" Column="76" TopLine="493"/>
|
||||
<Caret Line="474" Column="49" TopLine="448"/>
|
||||
</Position17>
|
||||
<Position18>
|
||||
<Filename Value="../../../rxdb/rxdbgrid.pas"/>
|
||||
<Caret Line="1173" TopLine="1168"/>
|
||||
<Caret Line="2057" Column="3" TopLine="2055"/>
|
||||
</Position18>
|
||||
<Position19>
|
||||
<Filename Value="../../../rxdb/rxdbgrid.pas"/>
|
||||
<Caret Line="474" Column="49" TopLine="448"/>
|
||||
<Caret Line="535" Column="56" TopLine="509"/>
|
||||
</Position19>
|
||||
<Position20>
|
||||
<Filename Value="../../../rxdb/rxdbgrid.pas"/>
|
||||
<Caret Line="2057" Column="3" TopLine="2055"/>
|
||||
<Caret Line="1176" Column="3" TopLine="1173"/>
|
||||
</Position20>
|
||||
<Position21>
|
||||
<Filename Value="../../../rxdb/rxdbgrid.pas"/>
|
||||
<Caret Line="535" Column="56" TopLine="509"/>
|
||||
<Caret Line="471" Column="15" TopLine="466"/>
|
||||
</Position21>
|
||||
<Position22>
|
||||
<Filename Value="../../../rxdb/rxdbgrid.pas"/>
|
||||
<Caret Line="1176" Column="3" TopLine="1173"/>
|
||||
<Caret Line="2063" TopLine="2060"/>
|
||||
</Position22>
|
||||
<Position23>
|
||||
<Filename Value="../../../rxdb/rxdbgrid.pas"/>
|
||||
<Caret Line="471" Column="15" TopLine="466"/>
|
||||
<Caret Line="535" Column="65" TopLine="470"/>
|
||||
</Position23>
|
||||
<Position24>
|
||||
<Filename Value="../../../rxdb/rxdbgrid.pas"/>
|
||||
<Caret Line="2063" TopLine="2060"/>
|
||||
<Caret Line="530" Column="58" TopLine="528"/>
|
||||
</Position24>
|
||||
<Position25>
|
||||
<Filename Value="../../../rxdb/rxdbgrid.pas"/>
|
||||
<Caret Line="535" Column="65" TopLine="470"/>
|
||||
<Caret Line="1176" Column="3" TopLine="1174"/>
|
||||
</Position25>
|
||||
<Position26>
|
||||
<Filename Value="../../../rxdb/rxdbgrid.pas"/>
|
||||
<Caret Line="530" Column="58" TopLine="528"/>
|
||||
<Caret Line="471" Column="14" TopLine="453"/>
|
||||
</Position26>
|
||||
<Position27>
|
||||
<Filename Value="../../../rxdb/rxdbgrid.pas"/>
|
||||
<Caret Line="1176" Column="3" TopLine="1174"/>
|
||||
<Caret Line="2069" TopLine="2066"/>
|
||||
</Position27>
|
||||
<Position28>
|
||||
<Filename Value="../../../rxdb/rxdbgrid.pas"/>
|
||||
<Caret Line="471" Column="14" TopLine="453"/>
|
||||
<Caret Line="530" Column="14" TopLine="499"/>
|
||||
</Position28>
|
||||
<Position29>
|
||||
<Filename Value="../../../rxdb/rxdbgrid.pas"/>
|
||||
<Caret Line="2069" TopLine="2066"/>
|
||||
<Caret Line="1176" Column="21" TopLine="1174"/>
|
||||
</Position29>
|
||||
<Position30>
|
||||
<Filename Value="../../../rxdb/rxdbgrid.pas"/>
|
||||
<Caret Line="530" Column="14" TopLine="499"/>
|
||||
<Caret Line="529" Column="3" TopLine="512"/>
|
||||
</Position30>
|
||||
</JumpHistory>
|
||||
</ProjectSession>
|
||||
|
@ -276,13 +276,40 @@ begin
|
||||
end;
|
||||
|
||||
function TRxCustomDateRangeEdit.GetPeriod: TDateTime;
|
||||
var
|
||||
i: PtrInt;
|
||||
M: Word;
|
||||
begin
|
||||
Result:=EncodeDate(Year, Month, 1);
|
||||
i:=PtrInt(FEditMonth.Items.Objects[FEditMonth.ItemIndex]);
|
||||
|
||||
if I < 13 then
|
||||
M:=Month
|
||||
else
|
||||
if i in [13..16] then
|
||||
M:= (I - 13) * 3 + 1
|
||||
else
|
||||
if i in [17..18] then
|
||||
M:= (I - 17) * 6 + 1;
|
||||
|
||||
Result:=EncodeDate(Year, M, 1);
|
||||
end;
|
||||
|
||||
function TRxCustomDateRangeEdit.GetPeriodEnd: TDateTime;
|
||||
var
|
||||
i: PtrInt;
|
||||
M: Integer;
|
||||
begin
|
||||
Result:=EncodeDate(Year, Month, DaysPerMonth(Year, Month));
|
||||
i:=PtrInt(FEditMonth.Items.Objects[FEditMonth.ItemIndex]);
|
||||
if I < 13 then
|
||||
M:=Month
|
||||
else
|
||||
if i in [13..16] then
|
||||
M:= (I - 12) * 3
|
||||
else
|
||||
if i in [17..18] then
|
||||
M:= (I - 16) * 6;
|
||||
|
||||
Result:=EncodeDate(Year, M, DaysPerMonth(Year, M))
|
||||
end;
|
||||
|
||||
function TRxCustomDateRangeEdit.GetQuarter: word;
|
||||
@ -392,37 +419,28 @@ end;
|
||||
|
||||
procedure TRxCustomDateRangeEdit.FillMonthNames;
|
||||
var
|
||||
i, k: Integer;
|
||||
i: Integer;
|
||||
begin
|
||||
FEditMonth.Items.BeginUpdate;
|
||||
FEditMonth.Items.Clear;
|
||||
if (reoMonth in FOptions) or (FOptions = []) then
|
||||
begin
|
||||
for i:=1 to 12 do
|
||||
begin
|
||||
k:=FEditMonth.Items.Add(DefaultFormatSettings.LongMonthNames[i]);
|
||||
FEditMonth.Items.Objects[K]:=TObject(Pointer(i));
|
||||
end;
|
||||
FEditMonth.Items.AddObject(DefaultFormatSettings.LongMonthNames[i], TObject(Pointer(i)));
|
||||
end;
|
||||
|
||||
if (reoQuarter in FOptions) or (FOptions = []) then
|
||||
begin
|
||||
k:=FEditMonth.Items.Add(sFirstQuarter);
|
||||
FEditMonth.Items.Objects[K]:=TObject(Pointer(13));
|
||||
k:=FEditMonth.Items.Add(sSecondQuarter);
|
||||
FEditMonth.Items.Objects[K]:=TObject(Pointer(14));
|
||||
k:=FEditMonth.Items.Add(sThirdQuarter);
|
||||
FEditMonth.Items.Objects[K]:=TObject(Pointer(15));
|
||||
k:=FEditMonth.Items.Add(sFourthQuarter);
|
||||
FEditMonth.Items.Objects[K]:=TObject(Pointer(16));
|
||||
FEditMonth.Items.AddObject(sFirstQuarter, TObject(Pointer(13)));
|
||||
FEditMonth.Items.AddObject(sSecondQuarter, TObject(Pointer(14)));
|
||||
FEditMonth.Items.AddObject(sThirdQuarter, TObject(Pointer(15)));
|
||||
FEditMonth.Items.AddObject(sFourthQuarter, TObject(Pointer(16)));
|
||||
end;
|
||||
|
||||
if (reoHalfYear in FOptions) or (FOptions = []) then
|
||||
begin
|
||||
k:=FEditMonth.Items.Add(sFirstHalfOfYear);
|
||||
FEditMonth.Items.Objects[K]:=TObject(Pointer(17));
|
||||
k:=FEditMonth.Items.Add(sSecondHalfOfYear);
|
||||
FEditMonth.Items.Objects[K]:=TObject(Pointer(18));
|
||||
FEditMonth.Items.AddObject(sFirstHalfOfYear, TObject(Pointer(17)));
|
||||
FEditMonth.Items.AddObject(sSecondHalfOfYear, TObject(Pointer(18)));
|
||||
end;
|
||||
FEditMonth.ItemIndex:=0;
|
||||
FEditMonth.Items.EndUpdate;
|
||||
|
Reference in New Issue
Block a user