You've already forked lazarus-ccr
CalLite: Add keyboard support. Some refactoring.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@5314 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
@@ -27,18 +27,15 @@
|
||||
<FormatVersion Value="1"/>
|
||||
</local>
|
||||
</RunParams>
|
||||
<RequiredPackages Count="3">
|
||||
<RequiredPackages Count="2">
|
||||
<Item1>
|
||||
<PackageName Value="callight_pkg"/>
|
||||
</Item1>
|
||||
<Item2>
|
||||
<PackageName Value="RunTimeTypeInfoControls"/>
|
||||
</Item2>
|
||||
<Item3>
|
||||
<PackageName Value="LCL"/>
|
||||
</Item3>
|
||||
</Item2>
|
||||
</RequiredPackages>
|
||||
<Units Count="3">
|
||||
<Units Count="2">
|
||||
<Unit0>
|
||||
<Filename Value="testCalLite.lpr"/>
|
||||
<IsPartOfProject Value="True"/>
|
||||
@@ -51,11 +48,6 @@
|
||||
<ResourceBaseClass Value="Form"/>
|
||||
<UnitName Value="uMainTestCalLite"/>
|
||||
</Unit1>
|
||||
<Unit2>
|
||||
<Filename Value="calendarlite.pp"/>
|
||||
<IsPartOfProject Value="True"/>
|
||||
<UnitName Value="CalendarLite"/>
|
||||
</Unit2>
|
||||
</Units>
|
||||
</ProjectOptions>
|
||||
<CompilerOptions>
|
||||
|
||||
@@ -9,7 +9,6 @@ object Form1: TForm1
|
||||
Color = clWindow
|
||||
Font.CharSet = ANSI_CHARSET
|
||||
OnCreate = FormCreate
|
||||
OnResize = FormResize
|
||||
LCLVersion = '1.7'
|
||||
object PSettings: TPanel
|
||||
Left = 0
|
||||
@@ -174,4 +173,25 @@ object Form1: TForm1
|
||||
TabOrder = 5
|
||||
end
|
||||
end
|
||||
object CalendarLite1: TCalendarLite
|
||||
Left = 132
|
||||
Height = 160
|
||||
Top = 489
|
||||
Width = 210
|
||||
Constraints.MinHeight = 120
|
||||
Constraints.MinWidth = 120
|
||||
ParentColor = False
|
||||
TabOrder = 1
|
||||
Date = 42678
|
||||
DisplayTexts = '"Today is",dd/mm/yyyy,"Holidays during","There are no holidays set for"'
|
||||
WeekendDays = [dowSunday, dowSaturday]
|
||||
end
|
||||
object Label1: TLabel
|
||||
Left = 76
|
||||
Height = 15
|
||||
Top = 425
|
||||
Width = 34
|
||||
Caption = 'Label1'
|
||||
ParentColor = False
|
||||
end
|
||||
end
|
||||
|
||||
@@ -6,16 +6,16 @@ interface
|
||||
|
||||
uses
|
||||
Classes, SysUtils, Forms, Graphics, ExtCtrls, StdCtrls, Spin, CalendarLite;
|
||||
// Easysize;
|
||||
|
||||
type
|
||||
|
||||
{ TForm1 }
|
||||
|
||||
TForm1 = class(TForm)
|
||||
CalendarLite1: TCalendarLite;
|
||||
cbUseHolidays: TCheckBox;
|
||||
cgOptions: TCheckGroup;
|
||||
//FormResizer1: TFormResizer;
|
||||
Label1: TLabel;
|
||||
LTitle: TLabel;
|
||||
LWidth: TLabel;
|
||||
lHeight: TLabel;
|
||||
@@ -27,14 +27,13 @@ type
|
||||
procedure cbUseHolidaysChange(Sender: TObject);
|
||||
procedure cgOptionsItemClick(Sender: TObject; Index: integer);
|
||||
procedure FormCreate(Sender: TObject);
|
||||
procedure FormResize(Sender: TObject);
|
||||
procedure rgLanguageClick(Sender: TObject);
|
||||
procedure rgStartingDOWClick(Sender: TObject);
|
||||
procedure seHeightChange(Sender: TObject);
|
||||
procedure seWidthChange(Sender: TObject);
|
||||
private
|
||||
copyCal, demoCal: TCalendarLite;
|
||||
FnoHolidays: boolean;
|
||||
FNoHolidays: boolean;
|
||||
procedure RespondToDateChange(Sender: tObject);
|
||||
procedure GetHolidays(Sender: TObject; AMonth, AYear: Integer; // wp
|
||||
var Holidays: THolidays);
|
||||
@@ -48,6 +47,9 @@ implementation
|
||||
|
||||
{$R *.lfm}
|
||||
|
||||
uses
|
||||
Dialogs;
|
||||
|
||||
function Easter(year:integer) : TDateTime; // wp
|
||||
var
|
||||
Day, Month : integer;
|
||||
@@ -82,7 +84,6 @@ end;
|
||||
procedure TForm1.FormCreate(Sender: TObject);
|
||||
var opt: TCalOption;
|
||||
begin
|
||||
// FormResizer1.InitializeForm;
|
||||
demoCal:= TCalendarLite.Create(Self);
|
||||
demoCal.Parent:= Self;
|
||||
demoCal.Left:= 10;
|
||||
@@ -115,11 +116,6 @@ begin
|
||||
copyCal.Options := copyCal.Options + [coShowBorder,coUseTopRowColors,coDayLine];
|
||||
end;
|
||||
|
||||
procedure TForm1.FormResize(Sender: TObject);
|
||||
begin
|
||||
// FormResizer1.ResizeAll;
|
||||
end;
|
||||
|
||||
procedure TForm1.rgLanguageClick(Sender: TObject);
|
||||
begin
|
||||
case rgLanguage.ItemIndex of
|
||||
@@ -129,41 +125,6 @@ begin
|
||||
3: demoCal.Languages := lgHebrew;
|
||||
4: demoCal.Languages := lgSpanish;
|
||||
end;
|
||||
|
||||
{
|
||||
case rgLanguage.ItemIndex of
|
||||
0: begin
|
||||
demoCal.DayNames := EnglishDays;
|
||||
demoCal.MonthNames := EnglishMonths;
|
||||
demoCal.DisplayTexts := DefaultDisplayText;
|
||||
demoCal.BiDiMode:= bdLeftToRight;
|
||||
end;
|
||||
1: begin
|
||||
demoCal.DayNames := FrenchDays;
|
||||
demoCal.MonthNames := FrenchMonths;
|
||||
demoCal.DisplayTexts := FrenchTexts;
|
||||
demoCal.BiDiMode:= bdLeftToRight;
|
||||
end;
|
||||
2: begin
|
||||
demoCal.DayNames := GermanDays;
|
||||
demoCal.MonthNames := GermanMonths;
|
||||
demoCal.DisplayTexts := GermamTexts;
|
||||
demoCal.BiDiMode:= bdLeftToRight;
|
||||
end;
|
||||
3: begin
|
||||
demoCal.DayNames := HebrewDays;
|
||||
demoCal.MonthNames := HebrewMonths;
|
||||
demoCal.DisplayTexts := HebrewTexts;
|
||||
demoCal.BiDiMode:= bdRightToLeft;
|
||||
end;
|
||||
4: begin
|
||||
demoCal.DayNames := SpanishDays;
|
||||
demoCal.MonthNames := SpanishMonths;
|
||||
demoCal.DisplayTexts := SpanishTexts;
|
||||
demoCal.BiDiMode:= bdLeftToRight;
|
||||
end;
|
||||
end;
|
||||
}
|
||||
end;
|
||||
|
||||
procedure TForm1.rgStartingDOWClick(Sender: TObject);
|
||||
@@ -183,7 +144,7 @@ end;
|
||||
|
||||
procedure TForm1.cbUseHolidaysChange(Sender: TObject);
|
||||
begin
|
||||
FnoHolidays := not FnoHolidays;
|
||||
FNoHolidays := not FNoHolidays;
|
||||
end;
|
||||
|
||||
procedure TForm1.cgOptionsItemClick(Sender: TObject; Index: integer);
|
||||
|
||||
Reference in New Issue
Block a user