You've already forked lazarus-ccr
jvcllaz: Use system colors in JvTFWeeks and JvTFMonths. Store more settings of demo program in ini file.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@7112 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
@ -22,9 +22,9 @@ object MainForm: TMainForm
|
|||||||
Height = 515
|
Height = 515
|
||||||
Top = 73
|
Top = 73
|
||||||
Width = 477
|
Width = 477
|
||||||
ActivePage = TabSheet2
|
ActivePage = TabSheet3
|
||||||
Align = alClient
|
Align = alClient
|
||||||
TabIndex = 1
|
TabIndex = 2
|
||||||
TabOrder = 0
|
TabOrder = 0
|
||||||
object TabSheet1: TTabSheet
|
object TabSheet1: TTabSheet
|
||||||
Caption = 'Day View'
|
Caption = 'Day View'
|
||||||
@ -89,7 +89,7 @@ object MainForm: TMainForm
|
|||||||
OnDateChanging = JvTFDays1DateChanging
|
OnDateChanging = JvTFDays1DateChanging
|
||||||
OnDateChanged = JvTFDays1DateChanged
|
OnDateChanged = JvTFDays1DateChanged
|
||||||
OnGranularityChanged = JvTFDays1GranularityChanged
|
OnGranularityChanged = JvTFDays1GranularityChanged
|
||||||
DateFormat = 'ddddd'
|
DateFormat = 'dddddd'
|
||||||
TimeFormat = 't'
|
TimeFormat = 't'
|
||||||
Align = alClient
|
Align = alClient
|
||||||
Color = clWindow
|
Color = clWindow
|
||||||
@ -151,14 +151,14 @@ object MainForm: TMainForm
|
|||||||
TitleAttr.TxtAttr.Font.Style = [fsBold]
|
TitleAttr.TxtAttr.Font.Style = [fsBold]
|
||||||
TitleAttr.Title = 'Week of Jan 14, 2002'
|
TitleAttr.Title = 'Week of Jan 14, 2002'
|
||||||
CellAttr.Font.Color = clWindowText
|
CellAttr.Font.Color = clWindowText
|
||||||
CellAttr.TitleAttr.Color = clWhite
|
|
||||||
CellAttr.TitleAttr.FrameAttr.Color = clGray
|
CellAttr.TitleAttr.FrameAttr.Color = clGray
|
||||||
CellAttr.TitleAttr.DayTxtAttr.Font.Color = clWindowText
|
CellAttr.TitleAttr.DayTxtAttr.Font.Color = clWindowText
|
||||||
CellAttr.DrawBottomLine = False
|
CellAttr.TitleAttr.DayTxtAttr.Font.Style = [fsBold]
|
||||||
|
CellAttr.DrawBottomLine = True
|
||||||
SelCellAttr.Font.Color = clWindowText
|
SelCellAttr.Font.Color = clWindowText
|
||||||
SelCellAttr.TitleAttr.Color = clNavy
|
SelCellAttr.TitleAttr.Color = clHighlight
|
||||||
SelCellAttr.TitleAttr.DayTxtAttr.Font.Color = clWhite
|
SelCellAttr.TitleAttr.DayTxtAttr.Font.Color = clHighlightText
|
||||||
SelCellAttr.DrawBottomLine = False
|
SelCellAttr.DrawBottomLine = True
|
||||||
CellPics = StateImageList
|
CellPics = StateImageList
|
||||||
Viewer = GlanceTextViewer1
|
Viewer = GlanceTextViewer1
|
||||||
DateFormat = 'ddddd'
|
DateFormat = 'ddddd'
|
||||||
@ -176,7 +176,6 @@ object MainForm: TMainForm
|
|||||||
DWNames.DWN_Friday = 'F'
|
DWNames.DWN_Friday = 'F'
|
||||||
DWNames.DWN_Saturday = 'S'
|
DWNames.DWN_Saturday = 'S'
|
||||||
DWTitleAttr.Height = 20
|
DWTitleAttr.Height = 20
|
||||||
DWTitleAttr.Visible = False
|
|
||||||
DWTitleAttr.TxtAttr.Font.Color = clWindowText
|
DWTitleAttr.TxtAttr.Font.Color = clWindowText
|
||||||
DWTitleAttr.TxtAttr.Font.Height = -11
|
DWTitleAttr.TxtAttr.Font.Height = -11
|
||||||
DWTitleAttr.TxtAttr.Font.Style = [fsBold]
|
DWTitleAttr.TxtAttr.Font.Style = [fsBold]
|
||||||
@ -185,21 +184,15 @@ object MainForm: TMainForm
|
|||||||
object TabSheet3: TTabSheet
|
object TabSheet3: TTabSheet
|
||||||
Caption = 'Month View'
|
Caption = 'Month View'
|
||||||
ClientHeight = 487
|
ClientHeight = 487
|
||||||
ClientWidth = 437
|
ClientWidth = 469
|
||||||
ImageIndex = 2
|
ImageIndex = 2
|
||||||
object JvTFMonths1: TJvTFMonths
|
object JvTFMonths1: TJvTFMonths
|
||||||
Left = 0
|
Left = 0
|
||||||
Height = 487
|
Height = 487
|
||||||
Top = 0
|
Top = 0
|
||||||
Width = 437
|
Width = 469
|
||||||
ScheduleManager = utfScheduleManager1
|
ScheduleManager = utfScheduleManager1
|
||||||
Cells = <
|
Cells = <
|
||||||
item
|
|
||||||
Color = clBlack
|
|
||||||
CellDate = 37255
|
|
||||||
CellPics = <>
|
|
||||||
CanSelect = True
|
|
||||||
end
|
|
||||||
item
|
item
|
||||||
Color = clBlack
|
Color = clBlack
|
||||||
CellDate = 37256
|
CellDate = 37256
|
||||||
@ -445,6 +438,12 @@ object MainForm: TMainForm
|
|||||||
CellDate = 37296
|
CellDate = 37296
|
||||||
CellPics = <>
|
CellPics = <>
|
||||||
CanSelect = True
|
CanSelect = True
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Color = clBlack
|
||||||
|
CellDate = 37297
|
||||||
|
CellPics = <>
|
||||||
|
CanSelect = True
|
||||||
end>
|
end>
|
||||||
GapSize = 0
|
GapSize = 0
|
||||||
TitleAttr.TxtAttr.Font.Color = clWindowText
|
TitleAttr.TxtAttr.Font.Color = clWindowText
|
||||||
@ -452,13 +451,12 @@ object MainForm: TMainForm
|
|||||||
TitleAttr.TxtAttr.Font.Style = [fsBold]
|
TitleAttr.TxtAttr.Font.Style = [fsBold]
|
||||||
TitleAttr.Title = 'Januar 2002'
|
TitleAttr.Title = 'Januar 2002'
|
||||||
CellAttr.Font.Color = clWindowText
|
CellAttr.Font.Color = clWindowText
|
||||||
CellAttr.TitleAttr.Color = clWhite
|
CellAttr.TitleAttr.DayTxtAttr.Font.Style = [fsBold]
|
||||||
CellAttr.TitleAttr.DayTxtAttr.Font.Color = clWindowText
|
CellAttr.DrawBottomLine = True
|
||||||
CellAttr.DrawBottomLine = False
|
|
||||||
SelCellAttr.Font.Color = clWindowText
|
SelCellAttr.Font.Color = clWindowText
|
||||||
SelCellAttr.TitleAttr.Color = clNavy
|
SelCellAttr.TitleAttr.Color = clHighlight
|
||||||
SelCellAttr.TitleAttr.DayTxtAttr.Font.Color = clWhite
|
SelCellAttr.TitleAttr.DayTxtAttr.Font.Color = clHighlightText
|
||||||
SelCellAttr.DrawBottomLine = False
|
SelCellAttr.DrawBottomLine = True
|
||||||
Viewer = GlanceTextViewer2
|
Viewer = GlanceTextViewer2
|
||||||
DateFormat = 'ddddd'
|
DateFormat = 'ddddd'
|
||||||
TimeFormat = 't'
|
TimeFormat = 't'
|
||||||
@ -475,18 +473,25 @@ object MainForm: TMainForm
|
|||||||
DWNames.DWN_Thursday = 'T'
|
DWNames.DWN_Thursday = 'T'
|
||||||
DWNames.DWN_Friday = 'F'
|
DWNames.DWN_Friday = 'F'
|
||||||
DWNames.DWN_Saturday = 'S'
|
DWNames.DWN_Saturday = 'S'
|
||||||
|
DWTitleAttr.Color = clBtnShadow
|
||||||
DWTitleAttr.FrameAttr.Style = fs3DRaised
|
DWTitleAttr.FrameAttr.Style = fs3DRaised
|
||||||
DWTitleAttr.Height = 20
|
DWTitleAttr.Height = 20
|
||||||
DWTitleAttr.TxtAttr.Font.Color = clWindowText
|
DWTitleAttr.TxtAttr.Font.Color = clBtnHighlight
|
||||||
DWTitleAttr.TxtAttr.Font.Height = -11
|
DWTitleAttr.TxtAttr.Font.Height = -11
|
||||||
|
DWTitleAttr.TxtAttr.Font.Style = [fsBold]
|
||||||
|
DWTitleAttr.TxtAttr.AlignH = taCenter
|
||||||
ExtraDayCellAttr.Font.Color = clWindowText
|
ExtraDayCellAttr.Font.Color = clWindowText
|
||||||
ExtraDayCellAttr.TitleAttr.Color = clWhite
|
ExtraDayCellAttr.TitleAttr.Color = clWindow
|
||||||
ExtraDayCellAttr.TitleAttr.DayTxtAttr.Font.Color = clWindowText
|
ExtraDayCellAttr.TitleAttr.FrameAttr.Color = clSilver
|
||||||
ExtraDayCellAttr.DrawBottomLine = False
|
ExtraDayCellAttr.TitleAttr.DayTxtAttr.Font.Color = clSilver
|
||||||
|
ExtraDayCellAttr.TitleAttr.DayTxtAttr.Font.Style = [fsBold]
|
||||||
|
ExtraDayCellAttr.DrawBottomLine = True
|
||||||
OffDayCellAttr.Font.Color = clWindowText
|
OffDayCellAttr.Font.Color = clWindowText
|
||||||
OffDayCellAttr.TitleAttr.Color = clWhite
|
OffDayCellAttr.TitleAttr.Color = clWhite
|
||||||
OffDayCellAttr.TitleAttr.DayTxtAttr.Font.Color = clWindowText
|
OffDayCellAttr.TitleAttr.DayTxtAttr.Font.Color = clRed
|
||||||
OffDayCellAttr.DrawBottomLine = False
|
OffDayCellAttr.TitleAttr.DayTxtAttr.Font.Style = [fsBold]
|
||||||
|
OffDayCellAttr.DrawBottomLine = True
|
||||||
|
StartOfWeek = dowMonday
|
||||||
FirstDayOfMonthFormat = 'mmm d'
|
FirstDayOfMonthFormat = 'mmm d'
|
||||||
DayFormat = 'd'
|
DayFormat = 'd'
|
||||||
end
|
end
|
||||||
@ -723,7 +728,7 @@ object MainForm: TMainForm
|
|||||||
'2 mins'
|
'2 mins'
|
||||||
'1 min'
|
'1 min'
|
||||||
)
|
)
|
||||||
OnClick = TimeIncComboChange
|
OnChange = TimeIncComboChange
|
||||||
ParentShowHint = False
|
ParentShowHint = False
|
||||||
ShowHint = True
|
ShowHint = True
|
||||||
Style = csDropDownList
|
Style = csDropDownList
|
||||||
@ -796,20 +801,22 @@ object MainForm: TMainForm
|
|||||||
Width = 105
|
Width = 105
|
||||||
Anchors = [akTop, akLeft, akRight]
|
Anchors = [akTop, akLeft, akRight]
|
||||||
ItemHeight = 15
|
ItemHeight = 15
|
||||||
|
ItemIndex = 0
|
||||||
Items.Strings = (
|
Items.Strings = (
|
||||||
'31 days'
|
|
||||||
'14 days'
|
|
||||||
'7 days'
|
|
||||||
'5 days'
|
|
||||||
'3 days'
|
|
||||||
'2 days'
|
|
||||||
'1 day'
|
'1 day'
|
||||||
|
'2 days'
|
||||||
|
'3 days'
|
||||||
|
'5 days'
|
||||||
|
'7 days'
|
||||||
|
'14 days'
|
||||||
|
'31 days'
|
||||||
)
|
)
|
||||||
OnChange = DaysComboChange
|
OnChange = DaysComboChange
|
||||||
ParentShowHint = False
|
ParentShowHint = False
|
||||||
ShowHint = True
|
ShowHint = True
|
||||||
Style = csDropDownList
|
Style = csDropDownList
|
||||||
TabOrder = 12
|
TabOrder = 12
|
||||||
|
Text = '1 day'
|
||||||
end
|
end
|
||||||
object PrintButton: TBitBtn
|
object PrintButton: TBitBtn
|
||||||
AnchorSideLeft.Control = DeleteApptButton
|
AnchorSideLeft.Control = DeleteApptButton
|
||||||
|
@ -362,16 +362,27 @@ begin
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TMainForm.DaysComboChange(Sender: TObject);
|
procedure TMainForm.DaysComboChange(Sender: TObject);
|
||||||
|
var
|
||||||
|
s: String;
|
||||||
begin
|
begin
|
||||||
Case DaysCombo.ItemIndex of
|
Case DaysCombo.ItemIndex of
|
||||||
0 : JvTFDays1.Template.LinearDayCount := 31;
|
0 : JvTFDays1.Template.LinearDayCount := 1;
|
||||||
1 : JvTFDays1.Template.LinearDayCount := 14;
|
1 : JvTFDays1.Template.LinearDayCount := 2;
|
||||||
2 : JvTFDays1.Template.LinearDayCount := 7;
|
2 : JvTFDays1.Template.LinearDayCount := 3;
|
||||||
3 : JvTFDays1.Template.LinearDayCount := 5;
|
3 : JvTFDays1.Template.LinearDayCount := 5;
|
||||||
4 : JvTFDays1.Template.LinearDayCount := 3;
|
4 : JvTFDays1.Template.LinearDayCount := 7;
|
||||||
5 : JvTFDays1.Template.LinearDayCount := 2;
|
5 : JvTFDays1.Template.LinearDayCount := 14;
|
||||||
6 : JvTFDays1.Template.LinearDayCount := 1;
|
6 : JvTFDays1.Template.LinearDayCount := 31;
|
||||||
End;
|
End;
|
||||||
|
if JvTFDays1.Template.LinearDayCount <= 2 then
|
||||||
|
JvTFDays1.DateFormat := DefaultFormatSettings.LongDateFormat
|
||||||
|
else
|
||||||
|
if JvTFDays1.Template.LinearDayCount <= 5 then
|
||||||
|
JvTFDays1.DateFormat := DefaultFormatSettings.ShortDateFormat
|
||||||
|
else begin
|
||||||
|
s := StringReplace(DefaultFormatSettings.ShortDateFormat, 'yyyy', 'yy', [rfIgnoreCase]);
|
||||||
|
JvTFDays1.DateFormat := s;
|
||||||
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TMainForm.ShareButtonClick(Sender: TObject);
|
procedure TMainForm.ShareButtonClick(Sender: TObject);
|
||||||
@ -565,12 +576,15 @@ begin
|
|||||||
//GotoDatePicker.Date := Date;
|
//GotoDatePicker.Date := Date;
|
||||||
GotoDatePicker.Date := EncodeDate(2002, 1, 1);
|
GotoDatePicker.Date := EncodeDate(2002, 1, 1);
|
||||||
|
|
||||||
|
ReadIni;
|
||||||
|
(*
|
||||||
// Initialize the granularity
|
// Initialize the granularity
|
||||||
TimeIncCombo.ItemIndex := 1; // 30 mins
|
TimeIncCombo.ItemIndex := 1; // 30 mins
|
||||||
|
|
||||||
// Initialize the mode
|
// Initialize the mode
|
||||||
ModeCombo.ItemIndex := 0; // Single mode
|
ModeCombo.ItemIndex := 0; // Single mode
|
||||||
DaysCombo.ItemIndex := 6; // One day
|
DaysCombo.ItemIndex := 0; // One day
|
||||||
|
*)
|
||||||
|
|
||||||
// Populate the resource related controls
|
// Populate the resource related controls
|
||||||
With SchedulesQuery do
|
With SchedulesQuery do
|
||||||
@ -742,8 +756,6 @@ procedure TMainForm.FormCreate(Sender: TObject);
|
|||||||
var
|
var
|
||||||
fn: String;
|
fn: String;
|
||||||
begin
|
begin
|
||||||
ReadIni;
|
|
||||||
|
|
||||||
fn := Application.Location + 'data.sqlite';
|
fn := Application.Location + 'data.sqlite';
|
||||||
dbUTF.DatabaseName := fn;
|
dbUTF.DatabaseName := fn;
|
||||||
dbUTF.Connected := FileExists(fn);
|
dbUTF.Connected := FileExists(fn);
|
||||||
@ -760,6 +772,12 @@ var
|
|||||||
begin
|
begin
|
||||||
ini := TMemIniFile.Create(ChangeFileExt(Application.ExeName, '.ini'));
|
ini := TMemIniFile.Create(ChangeFileExt(Application.ExeName, '.ini'));
|
||||||
try
|
try
|
||||||
|
PageControl1.ActivePageIndex := ini.ReadInteger('MainForm', 'PageIndex', 0);
|
||||||
|
|
||||||
|
ModeCombo.ItemIndex := ini.ReadInteger('MainForm', 'ModeCombo', 0);
|
||||||
|
TimeIncCombo.ItemIndex := ini.ReadInteger('MainForm', 'TimeIncCombo', 1);
|
||||||
|
DaysCombo.ItemIndex := ini.ReadInteger('MainForm', 'DaysCombo', 0);
|
||||||
|
|
||||||
GlobalSettings.Hr2400 := ini.ReadBool('Settings', 'Hr2400', GlobalSettings.Hr2400);
|
GlobalSettings.Hr2400 := ini.ReadBool('Settings', 'Hr2400', GlobalSettings.Hr2400);
|
||||||
ApplySettings;
|
ApplySettings;
|
||||||
finally
|
finally
|
||||||
@ -773,6 +791,12 @@ var
|
|||||||
begin
|
begin
|
||||||
ini := TMemIniFile.Create(ChangeFileExt(Application.ExeName, '.ini'));
|
ini := TMemIniFile.Create(ChangeFileExt(Application.ExeName, '.ini'));
|
||||||
try
|
try
|
||||||
|
ini.WriteInteger('MainForm', 'PageIndex', PageControl1.ActivePageIndex);
|
||||||
|
|
||||||
|
ini.WriteInteger('MainForm', 'ModeCombo', ModeCombo.ItemIndex);
|
||||||
|
ini.WriteInteger('MainForm', 'TimeIncCombo', TimeIncCombo.ItemIndex);
|
||||||
|
ini.WriteInteger('MainForm', 'DaysCombo', DaysCombo.ItemIndex);
|
||||||
|
|
||||||
ini.WriteBool('Settings', 'Hr2400', GlobalSettings.Hr2400);
|
ini.WriteBool('Settings', 'Hr2400', GlobalSettings.Hr2400);
|
||||||
finally
|
finally
|
||||||
ini.Free;
|
ini.Free;
|
||||||
|
@ -338,7 +338,7 @@ type
|
|||||||
procedure Assign(Source: TPersistent); override;
|
procedure Assign(Source: TPersistent); override;
|
||||||
property GlanceControl: TJvTFCustomGlance read FGlanceControl;
|
property GlanceControl: TJvTFCustomGlance read FGlanceControl;
|
||||||
published
|
published
|
||||||
property Color: TColor read FColor write SetColor default clWhite;
|
property Color: TColor read FColor write SetColor default clWindow;
|
||||||
property Font: TFont read FFont write SetFont;
|
property Font: TFont read FFont write SetFont;
|
||||||
property FrameAttr: TJvTFGlanceFrameAttr read FFrameAttr write SetFrameAttr;
|
property FrameAttr: TJvTFGlanceFrameAttr read FFrameAttr write SetFrameAttr;
|
||||||
property TitleAttr: TJvTFGlanceTitleAttr read FTitleAttr write SetTitleAttr;
|
property TitleAttr: TJvTFGlanceTitleAttr read FTitleAttr write SetTitleAttr;
|
||||||
@ -1311,8 +1311,8 @@ begin
|
|||||||
FCellAttr := TJvTFGlanceCellAttr.Create(Self);
|
FCellAttr := TJvTFGlanceCellAttr.Create(Self);
|
||||||
FCellAttr.TitleAttr.DayTxtAttr.AlignH := taLeftJustify;
|
FCellAttr.TitleAttr.DayTxtAttr.AlignH := taLeftJustify;
|
||||||
FSelCellAttr := TJvTFGlanceCellAttr.Create(Self);
|
FSelCellAttr := TJvTFGlanceCellAttr.Create(Self);
|
||||||
FSelCellAttr.TitleAttr.Color := clNavy;
|
FSelCellAttr.TitleAttr.Color := clHighlight;
|
||||||
FSelCellAttr.TitleAttr.DayTxtAttr.Font.Color := clWhite;
|
FSelCellAttr.TitleAttr.DayTxtAttr.Font.Color := clHighlightText;
|
||||||
|
|
||||||
//FSelOrder := soColMajor;
|
//FSelOrder := soColMajor;
|
||||||
FSelOrder := soRowMajor;
|
FSelOrder := soRowMajor;
|
||||||
@ -3247,11 +3247,12 @@ begin
|
|||||||
inherited Create;
|
inherited Create;
|
||||||
FGlanceControl := AOwner;
|
FGlanceControl := AOwner;
|
||||||
|
|
||||||
FColor := clWhite;
|
FColor := clWindow;
|
||||||
FFrameAttr := TJvTFGlanceFrameAttr.Create(AOwner);
|
FFrameAttr := TJvTFGlanceFrameAttr.Create(AOwner);
|
||||||
FTitleAttr := TJvTFGlanceTitleAttr.Create(AOwner);
|
FTitleAttr := TJvTFGlanceTitleAttr.Create(AOwner);
|
||||||
|
|
||||||
FFont := TFont.Create;
|
FFont := TFont.Create;
|
||||||
|
FFont.Color := clWindowText;
|
||||||
FFont.OnChange := @FontChange;
|
FFont.OnChange := @FontChange;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
@ -131,9 +131,9 @@ begin
|
|||||||
FExtraDayCellAttr := TJvTFGlanceCellAttr.Create(Self);
|
FExtraDayCellAttr := TJvTFGlanceCellAttr.Create(Self);
|
||||||
FOffDayCellAttr := TJvTFGlanceCellAttr.Create(Self);
|
FOffDayCellAttr := TJvTFGlanceCellAttr.Create(Self);
|
||||||
|
|
||||||
CellAttr.TitleAttr.Color := clWhite;
|
//CellAttr.TitleAttr.Color := clWhite;
|
||||||
FExtraDayCellAttr.TitleAttr.Color := clWhite;
|
//FExtraDayCellAttr.TitleAttr.Color := clWhite;
|
||||||
FOffDayCellAttr.TitleAttr.Color := clWhite;
|
//FOffDayCellAttr.TitleAttr.Color := clWhite;
|
||||||
|
|
||||||
FDayFormat := 'd';
|
FDayFormat := 'd';
|
||||||
FFirstDayOfMonthFormat := 'mmm d';
|
FFirstDayOfMonthFormat := 'mmm d';
|
||||||
|
@ -181,7 +181,6 @@ begin
|
|||||||
inherited Create(AOwner);
|
inherited Create(AOwner);
|
||||||
|
|
||||||
GapSize := 4;
|
GapSize := 4;
|
||||||
CellAttr.TitleAttr.Color := clWhite;
|
|
||||||
CellAttr.TitleAttr.FrameAttr.Color := clGray;
|
CellAttr.TitleAttr.FrameAttr.Color := clGray;
|
||||||
|
|
||||||
FDWNames := TJvTFDWNames.Create;
|
FDWNames := TJvTFDWNames.Create;
|
||||||
|
Reference in New Issue
Block a user