You've already forked lazarus-ccr
jvcllaz: Add second iconset for JvTimeFramework demo.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@7128 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@ -44,7 +44,7 @@ type
|
|||||||
|
|
||||||
TMainForm = class(TForm)
|
TMainForm = class(TForm)
|
||||||
WeeksCombo: TComboBox;
|
WeeksCombo: TComboBox;
|
||||||
ImageList: TImageList;
|
StrokeImages: TImageList;
|
||||||
JvTFDaysPrinter1: TJvTFDaysPrinter;
|
JvTFDaysPrinter1: TJvTFDaysPrinter;
|
||||||
IconsProvidedLabel: TLabel;
|
IconsProvidedLabel: TLabel;
|
||||||
IconsLink: TLabel;
|
IconsLink: TLabel;
|
||||||
@ -52,7 +52,7 @@ type
|
|||||||
SettingsButton: TBitBtn;
|
SettingsButton: TBitBtn;
|
||||||
PrintDialog: TPrintDialog;
|
PrintDialog: TPrintDialog;
|
||||||
utfScheduleManager1: TJvTFScheduleManager;
|
utfScheduleManager1: TJvTFScheduleManager;
|
||||||
StateImageList: TImageList;
|
ColoredImages: TImageList;
|
||||||
NeedApptsQuery: TSQLQuery;
|
NeedApptsQuery: TSQLQuery;
|
||||||
ApptSchedulesQuery: TSQLQuery;
|
ApptSchedulesQuery: TSQLQuery;
|
||||||
GetApptQuery: TSQLQuery;
|
GetApptQuery: TSQLQuery;
|
||||||
@ -86,7 +86,6 @@ type
|
|||||||
dbUTF: TSQLite3Connection;
|
dbUTF: TSQLite3Connection;
|
||||||
SQLTransaction: TSQLTransaction;
|
SQLTransaction: TSQLTransaction;
|
||||||
|
|
||||||
procedure FormDestroy(Sender: TObject);
|
|
||||||
procedure IconsLinkClick(Sender: TObject);
|
procedure IconsLinkClick(Sender: TObject);
|
||||||
procedure IconsLinkMouseEnter(Sender: TObject);
|
procedure IconsLinkMouseEnter(Sender: TObject);
|
||||||
procedure IconsLinkMouseLeave(Sender: TObject);
|
procedure IconsLinkMouseLeave(Sender: TObject);
|
||||||
@ -129,6 +128,7 @@ type
|
|||||||
procedure utfScheduleManager1RefreshAppt(Sender: TObject; Appt: TJvTFAppt);
|
procedure utfScheduleManager1RefreshAppt(Sender: TObject; Appt: TJvTFAppt);
|
||||||
|
|
||||||
procedure FormCreate(Sender: TObject);
|
procedure FormCreate(Sender: TObject);
|
||||||
|
procedure FormDestroy(Sender: TObject);
|
||||||
procedure FormShow(Sender: TObject);
|
procedure FormShow(Sender: TObject);
|
||||||
|
|
||||||
procedure PrintButtonClick(Sender: TObject);
|
procedure PrintButtonClick(Sender: TObject);
|
||||||
@ -156,6 +156,8 @@ uses
|
|||||||
{$R *.lfm}
|
{$R *.lfm}
|
||||||
|
|
||||||
procedure TMainForm.ApplySettings;
|
procedure TMainForm.ApplySettings;
|
||||||
|
var
|
||||||
|
images: Array[0..1] of TImageList;
|
||||||
begin
|
begin
|
||||||
with GlobalSettings do begin
|
with GlobalSettings do begin
|
||||||
JvTFDays1.FancyRowHdrAttr.Hr2400 := Hr2400;
|
JvTFDays1.FancyRowHdrAttr.Hr2400 := Hr2400;
|
||||||
@ -168,6 +170,20 @@ begin
|
|||||||
JvTFDays1.PrimeTime.StartTime := PrimeTimeStart;
|
JvTFDays1.PrimeTime.StartTime := PrimeTimeStart;
|
||||||
JvTFDays1.PrimeTime.EndTime := PrimeTimeEnd;
|
JvTFDays1.PrimeTime.EndTime := PrimeTimeEnd;
|
||||||
JvTFDays1.PrimeTime.Color := PrimeTimeColor;
|
JvTFDays1.PrimeTime.Color := PrimeTimeColor;
|
||||||
|
|
||||||
|
images[0] := ColoredImages;
|
||||||
|
images[1] := StrokeImages;
|
||||||
|
PrevDateButton.Images := images[IconSet];
|
||||||
|
NextDateButton.Images := images[IconSet];
|
||||||
|
NewApptButton.Images := images[IconSet];
|
||||||
|
EditApptButton.Images := images[IconSet];
|
||||||
|
DeleteApptButton.Images := images[IconSet];
|
||||||
|
PrintButton.Images := images[IconSet];
|
||||||
|
SettingsButton.Images := images[IconSet];
|
||||||
|
ViewSchedsButton.Images := images[IconSet];
|
||||||
|
HideSchedButton.Images := images[IconSet];
|
||||||
|
ShareButton.Images := images[IconSet];
|
||||||
|
utfScheduleManager1.StateImages := images[IconSet];
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -775,6 +791,62 @@ procedure TMainForm.FormCreate(Sender: TObject);
|
|||||||
var
|
var
|
||||||
fn: String;
|
fn: String;
|
||||||
begin
|
begin
|
||||||
|
with DefaultFormatSettings do begin
|
||||||
|
CurrencyFormat := 1;
|
||||||
|
NegCurrFormat := 5;
|
||||||
|
ThousandSeparator := ',';
|
||||||
|
DecimalSeparator := '.';
|
||||||
|
CurrencyDecimals := 2;
|
||||||
|
DateSeparator := '-';
|
||||||
|
TimeSeparator := ':';
|
||||||
|
ListSeparator := ',';
|
||||||
|
CurrencyString := '$';
|
||||||
|
ShortDateFormat := 'd/m/y';
|
||||||
|
LongDateFormat := 'dd" "mmmm" "yyyy';
|
||||||
|
TimeAMString := 'AM';
|
||||||
|
TimePMString := 'PM';
|
||||||
|
ShortTimeFormat := 'hh:nn';
|
||||||
|
LongTimeFormat := 'hh:nn:ss';
|
||||||
|
ShortMonthNames[1] := 'Jan';
|
||||||
|
ShortMonthNames[2] := 'Feb';
|
||||||
|
ShortMonthNames[3] := 'Mar';
|
||||||
|
ShortMonthNames[4] := 'Apr';
|
||||||
|
ShortMonthNames[5] := 'May';
|
||||||
|
ShortMonthNames[6] := 'Jun';
|
||||||
|
ShortMonthNames[7] := 'Jul';
|
||||||
|
ShortMonthNames[8] := 'Aug';
|
||||||
|
ShortMonthNames[9] := 'Sep';
|
||||||
|
ShortMonthNames[10] := 'Oct';
|
||||||
|
ShortMonthNames[11] := 'Nov';
|
||||||
|
ShortMonthNames[12] := 'Dec';
|
||||||
|
LongMonthNames[1] := 'January';
|
||||||
|
LongMonthNames[2] := 'February';
|
||||||
|
LongMonthNames[3] := 'March';
|
||||||
|
LongMonthNames[4] := 'April';
|
||||||
|
LongMonthNames[5] := 'May';
|
||||||
|
LongMonthNames[6] := 'June';
|
||||||
|
LongMonthNames[7] := 'July';
|
||||||
|
LongMonthNames[8] := 'August';
|
||||||
|
LongMonthNames[9] := 'September';
|
||||||
|
LongMonthNames[10] := 'October';
|
||||||
|
LongMonthNames[11] := 'November';
|
||||||
|
LongMonthNames[12] := 'December';
|
||||||
|
ShortDayNames[1] := 'Sun';
|
||||||
|
ShortDayNames[2] := 'Mon';
|
||||||
|
ShortDayNames[3] := 'Tue';
|
||||||
|
ShortDayNames[4] := 'Wed';
|
||||||
|
ShortDayNames[5] := 'Thu';
|
||||||
|
ShortDayNames[6] := 'Fri';
|
||||||
|
ShortDayNames[7] := 'Sat';
|
||||||
|
LongDayNames[1] := 'Sunday';
|
||||||
|
LongDayNames[2] := 'Monday';
|
||||||
|
LongDayNames[3] := 'Tuesday';
|
||||||
|
LongDayNames[4] := 'Wednesday';
|
||||||
|
LongDayNames[5] := 'Thursday';
|
||||||
|
LongDayNames[6] := 'Friday';
|
||||||
|
LongDayNames[7] := 'Saturday';
|
||||||
|
end;
|
||||||
|
|
||||||
fn := Application.Location + 'data.sqlite';
|
fn := Application.Location + 'data.sqlite';
|
||||||
dbUTF.DatabaseName := fn;
|
dbUTF.DatabaseName := fn;
|
||||||
dbUTF.Connected := FileExists(fn);
|
dbUTF.Connected := FileExists(fn);
|
||||||
@ -804,6 +876,7 @@ begin
|
|||||||
GlobalSettings.PrimeTimeStart := ini.ReadTime('Settings', 'PrimeTimeStart', GlobalSettings.PrimeTimeStart);
|
GlobalSettings.PrimeTimeStart := ini.ReadTime('Settings', 'PrimeTimeStart', GlobalSettings.PrimeTimeStart);
|
||||||
GlobalSettings.PrimeTimeEnd := ini.ReadTime('Settings', 'PrimeTimeEnd', GlobalSettings.PrimeTimeEnd);
|
GlobalSettings.PrimeTimeEnd := ini.ReadTime('Settings', 'PrimeTimeEnd', GlobalSettings.PrimeTimeEnd);
|
||||||
GlobalSettings.PrimeTimeColor := TColor(ini.ReadInteger('Settings', 'PrimeTimeColor', Integer(GlobalSettings.PrimeTimeColor)));
|
GlobalSettings.PrimeTimeColor := TColor(ini.ReadInteger('Settings', 'PrimeTimeColor', Integer(GlobalSettings.PrimeTimeColor)));
|
||||||
|
GlobalSettings.IconSet := ini.ReadInteger('Settings', 'IconSet', GlobalSettings.IconSet);
|
||||||
ApplySettings;
|
ApplySettings;
|
||||||
finally
|
finally
|
||||||
ini.Free;
|
ini.Free;
|
||||||
@ -828,6 +901,7 @@ begin
|
|||||||
ini.WriteTime('Settings', 'PrimeTimeStart', GlobalSettings.PrimeTimeStart);
|
ini.WriteTime('Settings', 'PrimeTimeStart', GlobalSettings.PrimeTimeStart);
|
||||||
ini.WriteTime('Settings', 'PrimeTimeEnd', GlobalSettings.PrimeTimeEnd);
|
ini.WriteTime('Settings', 'PrimeTimeEnd', GlobalSettings.PrimeTimeEnd);
|
||||||
ini.WriteInteger('Settings', 'PrimeTimeColor', GlobalSettings.PrimeTimeColor);
|
ini.WriteInteger('Settings', 'PrimeTimeColor', GlobalSettings.PrimeTimeColor);
|
||||||
|
ini.WriteInteger('Settings', 'IconSet', GlobalSettings.IconSet);
|
||||||
finally
|
finally
|
||||||
ini.Free;
|
ini.Free;
|
||||||
end;
|
end;
|
||||||
|
@ -3,7 +3,8 @@ object SettingsForm: TSettingsForm
|
|||||||
Height = 299
|
Height = 299
|
||||||
Top = 283
|
Top = 283
|
||||||
Width = 403
|
Width = 403
|
||||||
Caption = 'SettingsForm'
|
AutoSize = True
|
||||||
|
Caption = 'Settings'
|
||||||
ClientHeight = 299
|
ClientHeight = 299
|
||||||
ClientWidth = 403
|
ClientWidth = 403
|
||||||
OnClose = FormClose
|
OnClose = FormClose
|
||||||
@ -16,6 +17,7 @@ object SettingsForm: TSettingsForm
|
|||||||
Height = 34
|
Height = 34
|
||||||
Top = 259
|
Top = 259
|
||||||
Width = 391
|
Width = 391
|
||||||
|
BorderSpacing.Top = 4
|
||||||
OKButton.Name = 'OKButton'
|
OKButton.Name = 'OKButton'
|
||||||
OKButton.DefaultCaption = True
|
OKButton.DefaultCaption = True
|
||||||
OKButton.OnClick = OKButtonClick
|
OKButton.OnClick = OKButtonClick
|
||||||
@ -30,12 +32,12 @@ object SettingsForm: TSettingsForm
|
|||||||
end
|
end
|
||||||
object Panel1: TPanel
|
object Panel1: TPanel
|
||||||
Left = 0
|
Left = 0
|
||||||
Height = 253
|
Height = 249
|
||||||
Top = 0
|
Top = 0
|
||||||
Width = 403
|
Width = 403
|
||||||
Align = alClient
|
Align = alClient
|
||||||
BevelOuter = bvNone
|
BevelOuter = bvNone
|
||||||
ClientHeight = 253
|
ClientHeight = 249
|
||||||
ClientWidth = 403
|
ClientWidth = 403
|
||||||
TabOrder = 1
|
TabOrder = 1
|
||||||
object Bevel1: TBevel
|
object Bevel1: TBevel
|
||||||
@ -90,6 +92,7 @@ object SettingsForm: TSettingsForm
|
|||||||
Top = 39
|
Top = 39
|
||||||
Width = 88
|
Width = 88
|
||||||
Anchors = [akTop, akRight]
|
Anchors = [akTop, akRight]
|
||||||
|
BorderSpacing.Left = 36
|
||||||
Caption = 'First day of week'
|
Caption = 'First day of week'
|
||||||
FocusControl = cbFirstDayOfWeek
|
FocusControl = cbFirstDayOfWeek
|
||||||
ParentColor = False
|
ParentColor = False
|
||||||
@ -176,6 +179,7 @@ object SettingsForm: TSettingsForm
|
|||||||
Top = 75
|
Top = 75
|
||||||
Width = 104
|
Width = 104
|
||||||
BorderSpacing.Left = 4
|
BorderSpacing.Left = 4
|
||||||
|
BorderSpacing.Right = 36
|
||||||
BorderWidth = 2
|
BorderWidth = 2
|
||||||
ButtonColorAutoSize = False
|
ButtonColorAutoSize = False
|
||||||
ButtonColorSize = 16
|
ButtonColorSize = 16
|
||||||
@ -183,5 +187,53 @@ object SettingsForm: TSettingsForm
|
|||||||
Caption = 'Prime time'
|
Caption = 'Prime time'
|
||||||
Margin = 4
|
Margin = 4
|
||||||
end
|
end
|
||||||
|
object Bevel2: TBevel
|
||||||
|
AnchorSideLeft.Control = Panel1
|
||||||
|
AnchorSideTop.Control = edPrimeTimeEnd
|
||||||
|
AnchorSideTop.Side = asrBottom
|
||||||
|
AnchorSideRight.Control = Panel1
|
||||||
|
AnchorSideRight.Side = asrBottom
|
||||||
|
Left = 8
|
||||||
|
Height = 3
|
||||||
|
Top = 120
|
||||||
|
Width = 387
|
||||||
|
Anchors = [akTop, akLeft, akRight]
|
||||||
|
BorderSpacing.Left = 8
|
||||||
|
BorderSpacing.Top = 8
|
||||||
|
BorderSpacing.Right = 8
|
||||||
|
Shape = bsTopLine
|
||||||
|
end
|
||||||
|
object cbIconSet: TComboBox
|
||||||
|
AnchorSideLeft.Control = edPrimeTimeEnd
|
||||||
|
AnchorSideRight.Control = cbTimeFormat
|
||||||
|
AnchorSideRight.Side = asrBottom
|
||||||
|
Left = 132
|
||||||
|
Height = 23
|
||||||
|
Top = 128
|
||||||
|
Width = 124
|
||||||
|
Anchors = [akTop, akLeft, akRight]
|
||||||
|
ItemHeight = 15
|
||||||
|
ItemIndex = 0
|
||||||
|
Items.Strings = (
|
||||||
|
'Color'
|
||||||
|
'Stroke style'
|
||||||
|
)
|
||||||
|
Style = csDropDownList
|
||||||
|
TabOrder = 4
|
||||||
|
Text = 'Color'
|
||||||
|
end
|
||||||
|
object lblIconSet: TLabel
|
||||||
|
AnchorSideTop.Control = cbIconSet
|
||||||
|
AnchorSideTop.Side = asrCenter
|
||||||
|
AnchorSideRight.Control = lblTimeFormat
|
||||||
|
AnchorSideRight.Side = asrBottom
|
||||||
|
Left = 83
|
||||||
|
Height = 15
|
||||||
|
Top = 132
|
||||||
|
Width = 41
|
||||||
|
Anchors = [akTop, akRight]
|
||||||
|
Caption = 'Icon set'
|
||||||
|
ParentColor = False
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -15,6 +15,7 @@ type
|
|||||||
PrimeTimeStart: TTime;
|
PrimeTimeStart: TTime;
|
||||||
PrimeTimeEnd: TTime;
|
PrimeTimeEnd: TTime;
|
||||||
PrimeTimeColor: TColor;
|
PrimeTimeColor: TColor;
|
||||||
|
IconSet: Integer;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
var
|
var
|
||||||
@ -24,6 +25,7 @@ var
|
|||||||
PrimeTimeStart: 8 * ONE_HOUR;
|
PrimeTimeStart: 8 * ONE_HOUR;
|
||||||
PrimeTimeEnd: 17 * ONE_HOUR;
|
PrimeTimeEnd: 17 * ONE_HOUR;
|
||||||
PrimeTimeColor: $00C4FFFF;
|
PrimeTimeColor: $00C4FFFF;
|
||||||
|
IconSet: 0
|
||||||
);
|
);
|
||||||
|
|
||||||
type
|
type
|
||||||
@ -31,10 +33,13 @@ type
|
|||||||
|
|
||||||
TSettingsForm = class(TForm)
|
TSettingsForm = class(TForm)
|
||||||
Bevel1: TBevel;
|
Bevel1: TBevel;
|
||||||
|
Bevel2: TBevel;
|
||||||
ButtonPanel1: TButtonPanel;
|
ButtonPanel1: TButtonPanel;
|
||||||
cbTimeFormat: TComboBox;
|
cbTimeFormat: TComboBox;
|
||||||
cbFirstDayOfWeek: TComboBox;
|
cbFirstDayOfWeek: TComboBox;
|
||||||
clbPrimeTimeColor: TColorButton;
|
clbPrimeTimeColor: TColorButton;
|
||||||
|
cbIconSet: TComboBox;
|
||||||
|
lblIconSet: TLabel;
|
||||||
lblPrimeTimeStart: TLabel;
|
lblPrimeTimeStart: TLabel;
|
||||||
lblPrimeTimeEnd: TLabel;
|
lblPrimeTimeEnd: TLabel;
|
||||||
lblFirstDayOfWeek: TLabel;
|
lblFirstDayOfWeek: TLabel;
|
||||||
@ -67,6 +72,7 @@ begin
|
|||||||
GlobalSettings.PrimeTimeStart := frac(edPrimeTimeStart.Time);
|
GlobalSettings.PrimeTimeStart := frac(edPrimeTimeStart.Time);
|
||||||
GlobalSettings.PrimeTimeEnd := frac(edPrimeTimeEnd.Time);
|
GlobalSettings.PrimeTimeEnd := frac(edPrimeTimeEnd.Time);
|
||||||
GlobalSettings.PrimeTimeColor := clbPrimeTimeColor.ButtonColor;
|
GlobalSettings.PrimeTimeColor := clbPrimeTimeColor.ButtonColor;
|
||||||
|
GlobalSettings.IconSet := cbIconSet.ItemIndex;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TSettingsForm.SettingsToControls;
|
procedure TSettingsForm.SettingsToControls;
|
||||||
@ -77,6 +83,7 @@ begin
|
|||||||
edPrimeTimeStart.Time := GlobalSettings.PrimeTimeStart;
|
edPrimeTimeStart.Time := GlobalSettings.PrimeTimeStart;
|
||||||
edPrimeTimeEnd.Time := GlobalSettings.PrimeTimeEnd;
|
edPrimeTimeEnd.Time := GlobalSettings.PrimeTimeEnd;
|
||||||
clbPrimeTimeColor.ButtonColor := GlobalSettings.PrimeTimeColor;
|
clbPrimeTimeColor.ButtonColor := GlobalSettings.PrimeTimeColor;
|
||||||
|
cbIconSet.ItemIndex := GlobalSettings.IconSet;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TSettingsForm.FormClose(Sender: TObject;
|
procedure TSettingsForm.FormClose(Sender: TObject;
|
||||||
|
Reference in New Issue
Block a user