TvPlanIt: Activate dayview drag-and-drop in the examples/datastores demos.

git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@8175 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
wp_xxyyzz
2021-12-13 21:56:17 +00:00
parent aedf5ffcc0
commit e584f4c869
18 changed files with 217 additions and 193 deletions

View File

@ -65,6 +65,9 @@
<UnitOutputDirectory Value="lib\$(TargetCPU)-$(TargetOS)"/>
</SearchPaths>
<Linking>
<Debugging>
<DebugInfoType Value="dsDwarf2Set"/>
</Debugging>
<Options>
<Win32>
<GraphicApplication Value="True"/>

View File

@ -1,14 +1,14 @@
object Form1: TForm1
Left = 344
Left = 497
Height = 686
Top = 169
Top = 161
Width = 910
Caption = 'Form1'
ClientHeight = 686
ClientWidth = 910
OnCreate = FormCreate
OnDestroy = FormDestroy
LCLVersion = '1.6.4.0'
LCLVersion = '2.3.0.0'
object Panel1: TPanel
Left = 0
Height = 33
@ -91,6 +91,7 @@ object Form1: TForm1
AllDayEventAttributes.BackgroundColor = clBtnShadow
AllDayEventAttributes.EventBorderColor = cl3DDkShadow
AllDayEventAttributes.EventBackgroundColor = clBtnFace
AllowDragAndDrop = True
ShowEventTimes = False
DrawingStyle = dsFlat
TimeSlotColors.Active = clWhite
@ -161,7 +162,6 @@ object Form1: TForm1
Align = alBottom
TabStop = True
TabOrder = 1
KBNavigation = True
DateLabelFormat = 'mmmm yyyy'
DayHeadAttributes.Font.Height = -13
DayHeadAttributes.Font.Name = 'Tahoma'
@ -170,6 +170,7 @@ object Form1: TForm1
DrawingStyle = dsFlat
EventDayStyle = []
HeadAttributes.Color = clBtnFace
KBNavigation = True
OffDayColor = clSilver
SelectedDayColor = clRed
ShowEvents = True
@ -233,11 +234,11 @@ object Form1: TForm1
end
object TabSheet2: TTabSheet
Caption = 'Contacts'
ClientHeight = 624
ClientWidth = 972
ClientHeight = 625
ClientWidth = 902
object VpContactButtonBar1: TVpContactButtonBar
Left = 0
Height = 624
Height = 625
Top = 0
Width = 40
DrawingStyle = dsFlat
@ -246,9 +247,9 @@ object Form1: TForm1
end
object VpContactGrid1: TVpContactGrid
Left = 40
Height = 624
Height = 625
Top = 0
Width = 932
Width = 862
DataStore = VpFlexDataStore1
ControlLink = VpControlLink1
Color = clWindow
@ -267,20 +268,16 @@ object Form1: TForm1
end
object VpControlLink1: TVpControlLink
DataStore = VpFlexDataStore1
Printer.BottomMargin = 0
Printer.DayStart = h_08
Printer.DayEnd = h_05
Printer.Granularity = gr30Min
Printer.LeftMargin = 0
Printer.MarginUnits = imAbsolutePixel
Printer.PrintFormats = <>
Printer.RightMargin = 0
Printer.TopMargin = 0
left = 136
top = 168
Left = 136
Top = 168
end
object VpResourceEditDialog1: TVpResourceEditDialog
Version = 'v1.05'
Version = 'v1.12'
DataStore = VpFlexDataStore1
Options = []
Placement.Position = mpCenter
@ -288,8 +285,8 @@ object Form1: TForm1
Placement.Left = 10
Placement.Height = 250
Placement.Width = 400
left = 136
top = 232
Left = 136
Top = 232
end
object VpFlexDataStore1: TVpFlexDataStore
CategoryColorMap.Category0.Color = clNavy
@ -324,8 +321,8 @@ object Form1: TForm1
DataSources.ContactsDataSource = DsContacts
DataSources.TasksDataSource = DsTasks
ResourceID = 0
left = 136
top = 101
Left = 136
Top = 101
ResourceFieldMappings = (
'ResourceID'
'ResourceID'
@ -517,23 +514,23 @@ object Form1: TForm1
end
object DsResources: TDataSource
DataSet = QryResources
left = 240
top = 428
Left = 240
Top = 428
end
object DsContacts: TDataSource
DataSet = QryContacts
left = 240
top = 496
Left = 240
Top = 496
end
object DsEvents: TDataSource
DataSet = QryEvents
left = 240
top = 560
Left = 240
Top = 560
end
object DsTasks: TDataSource
DataSet = QryTasks
left = 240
top = 621
Left = 240
Top = 621
end
object QryResources: TSQLQuery
PacketRecords = -1
@ -577,8 +574,9 @@ object Form1: TForm1
''
)
Params = <>
left = 136
top = 428
Macros = <>
Left = 136
Top = 428
end
object QryContacts: TSQLQuery
PacketRecords = -1
@ -771,8 +769,9 @@ object Form1: TForm1
''
)
Params = <>
left = 136
top = 496
Macros = <>
Left = 136
Top = 496
end
object QryEvents: TSQLQuery
PacketRecords = -1
@ -878,8 +877,9 @@ object Form1: TForm1
''
)
Params = <>
left = 136
top = 560
Macros = <>
Left = 136
Top = 560
end
object QryTasks: TSQLQuery
PacketRecords = -1
@ -948,23 +948,24 @@ object Form1: TForm1
''
)
Params = <>
left = 136
top = 621
Macros = <>
Left = 136
Top = 621
end
object SQLTransaction1: TSQLTransaction
Active = False
Action = caCommitRetaining
Database = SQLite3Connection1
Options = []
left = 136
top = 368
Left = 136
Top = 368
end
object SQLite3Connection1: TSQLite3Connection
Connected = False
LoginPrompt = False
KeepConnection = False
Transaction = SQLTransaction1
Options = []
left = 136
top = 312
AlwaysUseBigint = False
Left = 136
Top = 312
end
end

View File

@ -103,7 +103,7 @@ end;
procedure TForm1.CreateDB(AFileName: String);
begin
SQLite3Connection1.Close; // Ensure the connection is closed when we start
// Create the database and the tables
try
SQLite3Connection1.DatabaseName := AFileName;
@ -285,7 +285,13 @@ begin
// Transaction
SQLTransaction1.DataBase := Sqlite3Connection1;
SQLTransaction1.Action := caCommitRetaining;
QryResources.Options := QryResources.Options + [sqoAutoApplyUpdates];
QryEvents.Options := QryEvents.Options + [sqoAutoApplyUpdates];
QryTasks.Options := QryTasks.Options + [sqoAutoApplyUpdates];
QryContacts.Options := QryContacts.Options + [sqoAutoApplyUpdates];
if not FileExists(AppendPathDelim(Application.Location) + DB_NAME) then
CreateDB(AppendPathDelim(Application.Location) + DB_NAME);