You've already forked lazarus-ccr
tvplanit: Fix not persistent storage of visible days in DayView (demo).
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@4825 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
@ -111,6 +111,42 @@ object MainForm: TMainForm
|
||||
RowHeadAttributes.HourFont.Height = -24
|
||||
RowHeadAttributes.MinuteFont.Height = -12
|
||||
RowHeadAttributes.Color = clBtnFace
|
||||
IconAttributes.AlarmBitmap.Data = {
|
||||
36040000424D3604000000000000360000002800000010000000100000000100
|
||||
2000000000000004000064000000640000000000000000000000FFFFFF00FFFF
|
||||
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
|
||||
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
|
||||
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
|
||||
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
|
||||
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
|
||||
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00000000000000
|
||||
0000000000000303030003030300020202000101010401010151000000660000
|
||||
004D0000000001010100010101020101010001010100FFFFFF00000000000000
|
||||
0000000000000303030003030300030303000202022F2F2F2F96EFDEDEFF0000
|
||||
00710000000001010100010101460101012301010100FFFFFF00000000000000
|
||||
000000000000030303070303031C0303034B2523238A989191E9E4D2D2FF0000
|
||||
0085000000000101010001010119010101870101011BFFFFFF00000000770000
|
||||
00ED000000ED040404893F3A3A9F7C7272C2CAB9B9F4A49B9BFFCFBDBDFF0808
|
||||
088A0505050001010149010101260101013201010170FFFFFF00000000DB2D2D
|
||||
2DF83C3C3CFFCBB9B9FFC7B5B5FFC2B0B0FFBCAAAAFF9B9292FFBEACACFF1212
|
||||
12860A0A0A0001010119010101800101010D01010187FFFFFF00010101C05C5C
|
||||
5CFF4E4E4EFFB1A7A7FFB0A5A5FFAFA3A3FFADA0A0FF9A9393FFB9AAAAFF2020
|
||||
20812020200001010100010101870101010001010187FFFFFF00010101AE5F5F
|
||||
5FEA7A7A7AFFCFCFCFFFCCCCCCFFC7C6C6FFC0BEBEFFA9A8A8FFC9C6C6FF2F2F
|
||||
2F791818180000000015000000700000000B00000075FFFFFF00010101560101
|
||||
01AB010101AB3E3E3E726C6C6C8C9A9A9AB6CFCFCFF2B6B6B6FFD2D2D2FF3E3E
|
||||
3E721F1F1F00000000370000001E0000002600000055FFFFFF00010101000101
|
||||
01000101010048484806484848184B4B4B3E65656578BDBDBDE6E3E3E3FF4B4B
|
||||
4B6C4B4B4B0000000000000000100000005B00000013FFFFFF00010101000101
|
||||
01000101010048484800484848004D4D4D00535353297676768BECECECFF5454
|
||||
546754545400000000000000002B0000001600000000FFFFFF00010101000101
|
||||
010001010100484848004848480051515100555555045555554D555555665555
|
||||
554D555555002B2B2B00000000000000000000000000FFFFFF00FFFFFF00FFFF
|
||||
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
|
||||
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
|
||||
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
|
||||
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00
|
||||
}
|
||||
ShowResourceName = True
|
||||
LineColor = clGray
|
||||
GutterWidth = 7
|
||||
|
@ -91,8 +91,8 @@ type
|
||||
{ private declarations }
|
||||
FLang: String;
|
||||
FActiveView: Integer;
|
||||
FVisibleDays: Integer;
|
||||
procedure PopulateLanguages;
|
||||
procedure ReadIni;
|
||||
procedure SetActiveView(AValue: Integer);
|
||||
procedure SetLanguage(ALang: String); overload;
|
||||
procedure SetLanguage(AIndex: Integer); overload;
|
||||
@ -105,6 +105,7 @@ type
|
||||
procedure ShowSettings;
|
||||
procedure ShowTasks;
|
||||
|
||||
procedure ReadIni;
|
||||
procedure WriteIni;
|
||||
public
|
||||
{ public declarations }
|
||||
@ -449,8 +450,11 @@ begin
|
||||
RbHideCompletedTasks.Checked := true;
|
||||
RbAllTasksChange(nil);
|
||||
|
||||
DaysTrackbar.Position := ini.ReadInteger('Settings', 'VisibleDays', DaysTrackbar.Position);
|
||||
DaysTrackbarChange(nil);
|
||||
FVisibleDays := ini.ReadInteger('Settings', 'VisibleDays', DaysTrackbar.Position);
|
||||
if FActiveView = 3 then begin // DayView
|
||||
DaysTrackbar.Position := FVisibleDays;
|
||||
DaysTrackbarChange(nil);
|
||||
end;
|
||||
|
||||
CbAllowInplaceEditing.Checked := ini.ReadBool('Settings', 'AllowInplaceEditing', CbAllowInplaceEditing.Checked);
|
||||
CbAllowInplaceEditingChange(nil);
|
||||
@ -482,7 +486,7 @@ begin
|
||||
ini.WriteInteger('Settings', 'TimeFormat', ord(VpDayView1.TimeFormat));
|
||||
ini.WriteInteger('Settings', 'Granularity', ord(VpDayView1.Granularity));
|
||||
ini.WriteInteger('Settings', 'FirstDayOfWeek', ord(VpWeekView1.WeekStartsOn));
|
||||
ini.WriteInteger('Settings', 'VisibleDays', VpDayView1.NumDays);
|
||||
ini.WriteInteger('Settings', 'VisibleDays', FVisibleDays);
|
||||
ini.WriteBool('Settings', 'AllTasks', VpTaskList1.DisplayOptions.ShowAll);
|
||||
ini.WriteBool('Settings', 'AllowInplaceEditing', CbAllowInplaceEditing.Checked);
|
||||
finally
|
||||
@ -698,6 +702,7 @@ begin
|
||||
VpDayView1.Show;
|
||||
DaySelectorPanel.Parent := TabEvents;
|
||||
DaySelectorPanel.Show;
|
||||
DaysTrackbar.Position := FVisibleDays;
|
||||
VpDayView1.NumDays := DaysTrackBar.Position;
|
||||
|
||||
TitleLbl.Caption := RSEventsPerDay;
|
||||
@ -734,6 +739,8 @@ end;
|
||||
|
||||
procedure TMainForm.DaysTrackBarChange(Sender: TObject);
|
||||
begin
|
||||
if FActiveView = 3 then
|
||||
FVisibleDays := DaysTrackbar.Position;
|
||||
VpDayView1.NumDays := DaysTrackBar.Position;
|
||||
end;
|
||||
|
||||
|
Reference in New Issue
Block a user