You've already forked lazarus-ccr
jvcllaz: Remove Windows unit from JvTimeFramework demo. Autosized layout of some forms.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@7098 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
@ -56,7 +56,7 @@
|
|||||||
<Unit1>
|
<Unit1>
|
||||||
<Filename Value="tfmain.pas"/>
|
<Filename Value="tfmain.pas"/>
|
||||||
<IsPartOfProject Value="True"/>
|
<IsPartOfProject Value="True"/>
|
||||||
<ComponentName Value="PhotoOpMain"/>
|
<ComponentName Value="MainForm"/>
|
||||||
<HasResources Value="True"/>
|
<HasResources Value="True"/>
|
||||||
<ResourceBaseClass Value="Form"/>
|
<ResourceBaseClass Value="Form"/>
|
||||||
<UnitName Value="tfMain"/>
|
<UnitName Value="tfMain"/>
|
||||||
@ -72,7 +72,9 @@
|
|||||||
<Unit3>
|
<Unit3>
|
||||||
<Filename Value="tfshare.pas"/>
|
<Filename Value="tfshare.pas"/>
|
||||||
<IsPartOfProject Value="True"/>
|
<IsPartOfProject Value="True"/>
|
||||||
|
<ComponentName Value="Share"/>
|
||||||
<HasResources Value="True"/>
|
<HasResources Value="True"/>
|
||||||
|
<ResourceBaseClass Value="Form"/>
|
||||||
<UnitName Value="tfShare"/>
|
<UnitName Value="tfShare"/>
|
||||||
</Unit3>
|
</Unit3>
|
||||||
<Unit4>
|
<Unit4>
|
||||||
|
@ -25,8 +25,7 @@ begin
|
|||||||
mtError, [mbOK], 0);
|
mtError, [mbOK], 0);
|
||||||
Halt;
|
Halt;
|
||||||
end;
|
end;
|
||||||
|
Application.CreateForm(TMainForm, MainForm);
|
||||||
Application.CreateForm(TPhotoOpMain, PhotoOpMain);
|
|
||||||
Application.CreateForm(TVisibleResources, VisibleResources);
|
Application.CreateForm(TVisibleResources, VisibleResources);
|
||||||
Application.CreateForm(TShare, Share);
|
Application.CreateForm(TShare, Share);
|
||||||
Application.CreateForm(TApptEdit, ApptEdit);
|
Application.CreateForm(TApptEdit, ApptEdit);
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
object ApptEdit: TApptEdit
|
object ApptEdit: TApptEdit
|
||||||
Left = 218
|
Left = 218
|
||||||
Height = 210
|
Height = 189
|
||||||
Top = 152
|
Top = 152
|
||||||
Width = 350
|
Width = 350
|
||||||
AutoSize = True
|
AutoSize = True
|
||||||
Caption = 'ApptEdit'
|
Caption = 'ApptEdit'
|
||||||
ClientHeight = 210
|
ClientHeight = 189
|
||||||
ClientWidth = 350
|
ClientWidth = 350
|
||||||
Color = clBtnFace
|
Color = clBtnFace
|
||||||
Font.Color = clWindowText
|
Font.Color = clWindowText
|
||||||
@ -165,16 +165,13 @@ object ApptEdit: TApptEdit
|
|||||||
end
|
end
|
||||||
object Image2: TImage
|
object Image2: TImage
|
||||||
AnchorSideLeft.Control = Image1
|
AnchorSideLeft.Control = Image1
|
||||||
AnchorSideLeft.Side = asrCenter
|
|
||||||
AnchorSideTop.Control = Bevel2
|
AnchorSideTop.Control = Bevel2
|
||||||
AnchorSideTop.Side = asrBottom
|
AnchorSideTop.Side = asrBottom
|
||||||
AnchorSideRight.Control = Image1
|
|
||||||
AnchorSideRight.Side = asrBottom
|
AnchorSideRight.Side = asrBottom
|
||||||
Left = 14
|
Left = 6
|
||||||
Height = 24
|
Height = 24
|
||||||
Top = 115
|
Top = 115
|
||||||
Width = 24
|
Width = 24
|
||||||
Anchors = [akTop, akRight]
|
|
||||||
AutoSize = True
|
AutoSize = True
|
||||||
BorderSpacing.Top = 8
|
BorderSpacing.Top = 8
|
||||||
BorderSpacing.Bottom = 8
|
BorderSpacing.Bottom = 8
|
||||||
|
@ -26,10 +26,12 @@
|
|||||||
|
|
||||||
unit tfApptEdit;
|
unit tfApptEdit;
|
||||||
|
|
||||||
|
{$mode objfpc}{$H+}
|
||||||
|
|
||||||
interface
|
interface
|
||||||
|
|
||||||
uses
|
uses
|
||||||
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
|
SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
|
||||||
StdCtrls, Buttons, ComCtrls, JvTFManager, ExtCtrls, ButtonPanel,
|
StdCtrls, Buttons, ComCtrls, JvTFManager, ExtCtrls, ButtonPanel,
|
||||||
DateTimePicker;
|
DateTimePicker;
|
||||||
|
|
||||||
@ -97,7 +99,7 @@ var
|
|||||||
DaysGrid : TJvTFDays;
|
DaysGrid : TJvTFDays;
|
||||||
begin
|
begin
|
||||||
// Just a short cut to save typing :)
|
// Just a short cut to save typing :)
|
||||||
DaysGrid := PhotoOpMain.JvTFDays1;
|
DaysGrid := MainForm.JvTFDays1;
|
||||||
|
|
||||||
If Assigned(Appt) Then
|
If Assigned(Appt) Then
|
||||||
Begin
|
Begin
|
||||||
@ -122,7 +124,7 @@ begin
|
|||||||
Begin
|
Begin
|
||||||
// Assume we are adding a new appt
|
// Assume we are adding a new appt
|
||||||
// Request an appt from the server
|
// Request an appt from the server
|
||||||
Appt := PhotoOpMain.JvTFDays1.ScheduleManager.dbNewAppt('');
|
Appt := MainForm.JvTFDays1.ScheduleManager.dbNewAppt('');
|
||||||
// Right now this appt object is in a state of flux. It is not
|
// Right now this appt object is in a state of flux. It is not
|
||||||
// assigned to any schedules and shouldn't be because we're unsure
|
// assigned to any schedules and shouldn't be because we're unsure
|
||||||
// of its data. The caching system is programmed to automatically
|
// of its data. The caching system is programmed to automatically
|
||||||
@ -205,7 +207,7 @@ begin
|
|||||||
If AddingAppt Then
|
If AddingAppt Then
|
||||||
Begin
|
Begin
|
||||||
// Just a shortcut to save some typing :-)
|
// Just a shortcut to save some typing :-)
|
||||||
DaysGrid := PhotoOpMain.JvTFDays1;
|
DaysGrid := MainForm.JvTFDays1;
|
||||||
|
|
||||||
// Add the appt to selected schedule(s)
|
// Add the appt to selected schedule(s)
|
||||||
For I := 0 to DaysGrid.Cols.Count - 1 do
|
For I := 0 to DaysGrid.Cols.Count - 1 do
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
object PhotoOpMain: TPhotoOpMain
|
object MainForm: TMainForm
|
||||||
Left = 212
|
Left = 212
|
||||||
Height = 546
|
Height = 546
|
||||||
Top = 138
|
Top = 138
|
||||||
|
@ -26,22 +26,22 @@
|
|||||||
|
|
||||||
unit tfMain;
|
unit tfMain;
|
||||||
|
|
||||||
|
{$mode objfpc}{$H+}
|
||||||
|
|
||||||
interface
|
interface
|
||||||
|
|
||||||
uses
|
uses
|
||||||
LCLIntf,
|
LCLIntf,
|
||||||
//Windows, Messages,
|
|
||||||
SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
|
SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
|
||||||
Db, sqldb, sqlite3conn, //DBTables,
|
Db, sqldb, sqlite3conn, //DBTables,
|
||||||
ComCtrls, StdCtrls, Buttons, ExtCtrls, ImgList, DateTimePicker, JvTFManager,
|
ComCtrls, StdCtrls, Buttons, ExtCtrls, ImgList, DateTimePicker, JvTFManager,
|
||||||
JvTFDays, JvTFGlance, JvTFGlanceTextViewer, JvTFMonths, JvTFWeeks,
|
JvTFDays, JvTFGlance, JvTFGlanceTextViewer, JvTFMonths, JvTFWeeks;
|
||||||
JvComponent, JvExControls;
|
|
||||||
|
|
||||||
type
|
type
|
||||||
|
|
||||||
{ TPhotoOpMain }
|
{ TMainForm }
|
||||||
|
|
||||||
TPhotoOpMain = class(TForm)
|
TMainForm = class(TForm)
|
||||||
ImageList: TImageList;
|
ImageList: TImageList;
|
||||||
Label1: TLabel;
|
Label1: TLabel;
|
||||||
Label2: TLabel;
|
Label2: TLabel;
|
||||||
@ -127,7 +127,7 @@ type
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
var
|
var
|
||||||
PhotoOpMain: TPhotoOpMain;
|
MainForm: TMainForm;
|
||||||
|
|
||||||
implementation
|
implementation
|
||||||
|
|
||||||
@ -136,7 +136,7 @@ uses
|
|||||||
|
|
||||||
{$R *.lfm}
|
{$R *.lfm}
|
||||||
|
|
||||||
procedure TPhotoOpMain.utfScheduleManager1PostAppt(Sender: TObject;
|
procedure TMainForm.utfScheduleManager1PostAppt(Sender: TObject;
|
||||||
Appt: TJvTFAppt);
|
Appt: TJvTFAppt);
|
||||||
var
|
var
|
||||||
I : Integer;
|
I : Integer;
|
||||||
@ -190,7 +190,7 @@ begin
|
|||||||
End;
|
End;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TPhotoOpMain.utfScheduleManager1DeleteAppt(Sender: TObject;
|
procedure TMainForm.utfScheduleManager1DeleteAppt(Sender: TObject;
|
||||||
Appt: TJvTFAppt);
|
Appt: TJvTFAppt);
|
||||||
begin
|
begin
|
||||||
// First delete the appointment from the appointment table
|
// First delete the appointment from the appointment table
|
||||||
@ -208,7 +208,7 @@ begin
|
|||||||
End;
|
End;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TPhotoOpMain.utfScheduleManager1RefreshAppt(Sender: TObject;
|
procedure TMainForm.utfScheduleManager1RefreshAppt(Sender: TObject;
|
||||||
Appt: TJvTFAppt);
|
Appt: TJvTFAppt);
|
||||||
begin
|
begin
|
||||||
With GetApptQuery do
|
With GetApptQuery do
|
||||||
@ -244,7 +244,7 @@ begin
|
|||||||
End;
|
End;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TPhotoOpMain.ModeComboChange(Sender: TObject);
|
procedure TMainForm.ModeComboChange(Sender: TObject);
|
||||||
begin
|
begin
|
||||||
If ModeCombo.ItemIndex = 0 Then
|
If ModeCombo.ItemIndex = 0 Then
|
||||||
// Single mode
|
// Single mode
|
||||||
@ -280,12 +280,12 @@ begin
|
|||||||
End;
|
End;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TPhotoOpMain.ViewSchedsButtonClick(Sender: TObject);
|
procedure TMainForm.ViewSchedsButtonClick(Sender: TObject);
|
||||||
begin
|
begin
|
||||||
VisibleResources.ShowModal;
|
VisibleResources.ShowModal;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TPhotoOpMain.HideSchedButtonClick(Sender: TObject);
|
procedure TMainForm.HideSchedButtonClick(Sender: TObject);
|
||||||
var
|
var
|
||||||
I,
|
I,
|
||||||
NameIndex : Integer;
|
NameIndex : Integer;
|
||||||
@ -316,7 +316,7 @@ begin
|
|||||||
End;
|
End;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TPhotoOpMain.ResourceComboChange(Sender: TObject);
|
procedure TMainForm.ResourceComboChange(Sender: TObject);
|
||||||
begin
|
begin
|
||||||
JvTFDays1.Template.LinearName := ResourceCombo.Text;
|
JvTFDays1.Template.LinearName := ResourceCombo.Text;
|
||||||
JvTFWeeks1.SchedNames.Clear;
|
JvTFWeeks1.SchedNames.Clear;
|
||||||
@ -327,7 +327,7 @@ begin
|
|||||||
JvTFMonths1.Refresh;
|
JvTFMonths1.Refresh;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TPhotoOpMain.DaysComboChange(Sender: TObject);
|
procedure TMainForm.DaysComboChange(Sender: TObject);
|
||||||
begin
|
begin
|
||||||
Case DaysCombo.ItemIndex of
|
Case DaysCombo.ItemIndex of
|
||||||
0 : JvTFDays1.Template.LinearDayCount := 31;
|
0 : JvTFDays1.Template.LinearDayCount := 31;
|
||||||
@ -340,7 +340,7 @@ begin
|
|||||||
End;
|
End;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TPhotoOpMain.ShareButtonClick(Sender: TObject);
|
procedure TMainForm.ShareButtonClick(Sender: TObject);
|
||||||
begin
|
begin
|
||||||
If JvTFDays1.SelAppt <> nil Then
|
If JvTFDays1.SelAppt <> nil Then
|
||||||
Share.ShowModal
|
Share.ShowModal
|
||||||
@ -348,17 +348,17 @@ begin
|
|||||||
MessageDlg('Please select an appointment.', mtInformation, [mbOK], 0);
|
MessageDlg('Please select an appointment.', mtInformation, [mbOK], 0);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TPhotoOpMain.PrevDateButtonClick(Sender: TObject);
|
procedure TMainForm.PrevDateButtonClick(Sender: TObject);
|
||||||
begin
|
begin
|
||||||
JvTFDays1.PrevDate;
|
JvTFDays1.PrevDate;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TPhotoOpMain.NextDateButtonClick(Sender: TObject);
|
procedure TMainForm.NextDateButtonClick(Sender: TObject);
|
||||||
begin
|
begin
|
||||||
JvTFDays1.NextDate;
|
JvTFDays1.NextDate;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TPhotoOpMain.GotoDatePickerChange(Sender: TObject);
|
procedure TMainForm.GotoDatePickerChange(Sender: TObject);
|
||||||
begin
|
begin
|
||||||
// GotoDatePicker.OnCloseUp should also point to this handler
|
// GotoDatePicker.OnCloseUp should also point to this handler
|
||||||
JvTFDays1.GotoDate(GotoDatePicker.Date);
|
JvTFDays1.GotoDate(GotoDatePicker.Date);
|
||||||
@ -366,7 +366,7 @@ begin
|
|||||||
JvTFWeeks1.DisplayDate := GotoDatePicker.Date;
|
JvTFWeeks1.DisplayDate := GotoDatePicker.Date;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TPhotoOpMain.GotoDatePickerUserInput(Sender: TObject;
|
procedure TMainForm.GotoDatePickerUserInput(Sender: TObject;
|
||||||
const UserString: String; var DateAndTime: TDateTime;
|
const UserString: String; var DateAndTime: TDateTime;
|
||||||
var AllowChange: Boolean);
|
var AllowChange: Boolean);
|
||||||
begin
|
begin
|
||||||
@ -374,7 +374,7 @@ begin
|
|||||||
GotoDatePicker.OnChange(nil);
|
GotoDatePicker.OnChange(nil);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TPhotoOpMain.TimeIncComboChange(Sender: TObject);
|
procedure TMainForm.TimeIncComboChange(Sender: TObject);
|
||||||
begin
|
begin
|
||||||
Case TimeIncCombo.ItemIndex of
|
Case TimeIncCombo.ItemIndex of
|
||||||
0 : JvTFDays1.Granularity := 60;
|
0 : JvTFDays1.Granularity := 60;
|
||||||
@ -392,7 +392,7 @@ begin
|
|||||||
End;
|
End;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TPhotoOpMain.NewApptButtonClick(Sender: TObject);
|
procedure TMainForm.NewApptButtonClick(Sender: TObject);
|
||||||
begin
|
begin
|
||||||
// Simply open the EditAppt window. The Appt var of the
|
// Simply open the EditAppt window. The Appt var of the
|
||||||
// EditAppt form will already be nil (which indicates
|
// EditAppt form will already be nil (which indicates
|
||||||
@ -400,7 +400,7 @@ begin
|
|||||||
ApptEdit.ShowModal;
|
ApptEdit.ShowModal;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TPhotoOpMain.EditApptButtonClick(Sender: TObject);
|
procedure TMainForm.EditApptButtonClick(Sender: TObject);
|
||||||
begin
|
begin
|
||||||
If Assigned(JvTFDays1.SelAppt) Then
|
If Assigned(JvTFDays1.SelAppt) Then
|
||||||
Begin
|
Begin
|
||||||
@ -414,7 +414,7 @@ begin
|
|||||||
[mbOK], 0);
|
[mbOK], 0);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TPhotoOpMain.DeleteApptButtonClick(Sender: TObject);
|
procedure TMainForm.DeleteApptButtonClick(Sender: TObject);
|
||||||
var
|
var
|
||||||
Appt : TJvTFAppt;
|
Appt : TJvTFAppt;
|
||||||
dbDel : Boolean;
|
dbDel : Boolean;
|
||||||
@ -471,14 +471,14 @@ begin
|
|||||||
mtInformation, [mbOK], 0);
|
mtInformation, [mbOK], 0);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TPhotoOpMain.JvTFDays1DateChanging(Sender: TObject;
|
procedure TMainForm.JvTFDays1DateChanging(Sender: TObject;
|
||||||
var NewDate: TDate);
|
var NewDate: TDate);
|
||||||
begin
|
begin
|
||||||
// Make sure all appts are posted before moving on.
|
// Make sure all appts are posted before moving on.
|
||||||
JvTFDays1.ScheduleManager.PostAppts;
|
JvTFDays1.ScheduleManager.PostAppts;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TPhotoOpMain.JvTFDays1DateChanged(Sender: TObject);
|
procedure TMainForm.JvTFDays1DateChanged(Sender: TObject);
|
||||||
begin
|
begin
|
||||||
// Synchronize the tool bar
|
// Synchronize the tool bar
|
||||||
With JvTFDays1.Template do
|
With JvTFDays1.Template do
|
||||||
@ -488,7 +488,7 @@ begin
|
|||||||
GotoDatePicker.Date := CompDate;
|
GotoDatePicker.Date := CompDate;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TPhotoOpMain.JvTFDays1GranularityChanged(Sender: TObject);
|
procedure TMainForm.JvTFDays1GranularityChanged(Sender: TObject);
|
||||||
begin
|
begin
|
||||||
// Update the TimeIncCombo when the granularity is changed.
|
// Update the TimeIncCombo when the granularity is changed.
|
||||||
// (This can be done by <Ctrl> + <Insert> and <Ctrl> + <Delete>)
|
// (This can be done by <Ctrl> + <Insert> and <Ctrl> + <Delete>)
|
||||||
@ -509,7 +509,7 @@ begin
|
|||||||
End;
|
End;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TPhotoOpMain.JvTFDays1DblClick(Sender: TObject);
|
procedure TMainForm.JvTFDays1DblClick(Sender: TObject);
|
||||||
begin
|
begin
|
||||||
With JvTFDays1 do
|
With JvTFDays1 do
|
||||||
If ValidSelection Then
|
If ValidSelection Then
|
||||||
@ -519,7 +519,7 @@ begin
|
|||||||
NewApptButtonClick(nil);
|
NewApptButtonClick(nil);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TPhotoOpMain.FormShow(Sender: TObject);
|
procedure TMainForm.FormShow(Sender: TObject);
|
||||||
var
|
var
|
||||||
ResName : String;
|
ResName : String;
|
||||||
begin
|
begin
|
||||||
@ -574,7 +574,7 @@ begin
|
|||||||
TimeIncComboChange(nil);
|
TimeIncComboChange(nil);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TPhotoOpMain.PrintButtonClick(Sender: TObject);
|
procedure TMainForm.PrintButtonClick(Sender: TObject);
|
||||||
begin
|
begin
|
||||||
(******************** wp: deactivated due to stack overflow ************
|
(******************** wp: deactivated due to stack overflow ************
|
||||||
With JvTFDaysPrinter1 do
|
With JvTFDaysPrinter1 do
|
||||||
@ -598,7 +598,7 @@ begin
|
|||||||
************************)
|
************************)
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TPhotoOpMain.JvTFDaysPrinter1ApptProgress(Sender: TObject;
|
procedure TMainForm.JvTFDaysPrinter1ApptProgress(Sender: TObject;
|
||||||
Current, Total: Integer);
|
Current, Total: Integer);
|
||||||
begin
|
begin
|
||||||
If Current > Total Then
|
If Current > Total Then
|
||||||
@ -609,7 +609,7 @@ begin
|
|||||||
PrintProgress.ProgressBar1.Position := Current;
|
PrintProgress.ProgressBar1.Position := Current;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TPhotoOpMain.JvTFDaysPrinter1AssembleProgress(Sender: TObject;
|
procedure TMainForm.JvTFDaysPrinter1AssembleProgress(Sender: TObject;
|
||||||
Current, Total: Integer);
|
Current, Total: Integer);
|
||||||
begin
|
begin
|
||||||
PrintProgress.Label2.Caption := 'Assembling page ' + IntToStr(Current) +
|
PrintProgress.Label2.Caption := 'Assembling page ' + IntToStr(Current) +
|
||||||
@ -618,7 +618,7 @@ begin
|
|||||||
PrintProgress.ProgressBar1.Position := Current;
|
PrintProgress.ProgressBar1.Position := Current;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TPhotoOpMain.JvTFDaysPrinter1PrintProgress(Sender: TObject;
|
procedure TMainForm.JvTFDaysPrinter1PrintProgress(Sender: TObject;
|
||||||
Current, Total: Integer);
|
Current, Total: Integer);
|
||||||
begin
|
begin
|
||||||
PrintProgress.Label2.Caption := 'Printing page ' + IntToStr(Current) +
|
PrintProgress.Label2.Caption := 'Printing page ' + IntToStr(Current) +
|
||||||
@ -627,24 +627,24 @@ begin
|
|||||||
PrintProgress.ProgressBar1.Position := Current;
|
PrintProgress.ProgressBar1.Position := Current;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TPhotoOpMain.Label2Click(Sender: TObject);
|
procedure TMainForm.Label2Click(Sender: TObject);
|
||||||
begin
|
begin
|
||||||
OpenURL('https://icons8.com');
|
OpenURL('https://icons8.com');
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TPhotoOpMain.Label2MouseEnter(Sender: TObject);
|
procedure TMainForm.Label2MouseEnter(Sender: TObject);
|
||||||
begin
|
begin
|
||||||
Label2.Font.Style := Label2.Font.Style + [fsUnderline];
|
Label2.Font.Style := Label2.Font.Style + [fsUnderline];
|
||||||
Screen.Cursor := crHandPoint;
|
Screen.Cursor := crHandPoint;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TPhotoOpMain.Label2MouseLeave(Sender: TObject);
|
procedure TMainForm.Label2MouseLeave(Sender: TObject);
|
||||||
begin
|
begin
|
||||||
Label2.Font.Style := Label2.Font.Style - [fsUnderline];
|
Label2.Font.Style := Label2.Font.Style - [fsUnderline];
|
||||||
Screen.Cursor := crDefault;
|
Screen.Cursor := crDefault;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TPhotoOpMain.utfScheduleManager1LoadBatch(Sender: TObject;
|
procedure TMainForm.utfScheduleManager1LoadBatch(Sender: TObject;
|
||||||
BatchName: String; BatchStartDate, BatchEndDate: TDate);
|
BatchName: String; BatchStartDate, BatchEndDate: TDate);
|
||||||
var
|
var
|
||||||
Appt : TJvTFAppt;
|
Appt : TJvTFAppt;
|
||||||
@ -699,7 +699,7 @@ begin
|
|||||||
End;
|
End;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TPhotoOpMain.FormCreate(Sender: TObject);
|
procedure TMainForm.FormCreate(Sender: TObject);
|
||||||
var
|
var
|
||||||
fn: String;
|
fn: String;
|
||||||
begin
|
begin
|
||||||
|
@ -26,10 +26,12 @@
|
|||||||
|
|
||||||
unit tfPrintProgress;
|
unit tfPrintProgress;
|
||||||
|
|
||||||
|
{$mode objfpc}{$H+}
|
||||||
|
|
||||||
interface
|
interface
|
||||||
|
|
||||||
uses
|
uses
|
||||||
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
|
SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
|
||||||
StdCtrls, Buttons, ComCtrls;
|
StdCtrls, Buttons, ComCtrls;
|
||||||
|
|
||||||
type
|
type
|
||||||
@ -51,7 +53,8 @@ var
|
|||||||
|
|
||||||
implementation
|
implementation
|
||||||
|
|
||||||
uses tfMain;
|
uses
|
||||||
|
tfMain;
|
||||||
|
|
||||||
{$R *.lfm}
|
{$R *.lfm}
|
||||||
|
|
||||||
|
@ -1,44 +1,47 @@
|
|||||||
object Share: TShare
|
object Share: TShare
|
||||||
Left = 738
|
Left = 738
|
||||||
|
Height = 216
|
||||||
Top = 285
|
Top = 285
|
||||||
Width = 271
|
Width = 271
|
||||||
Height = 216
|
AutoSize = True
|
||||||
Caption = 'Share'
|
Caption = 'Share'
|
||||||
|
ClientHeight = 216
|
||||||
|
ClientWidth = 271
|
||||||
Color = clBtnFace
|
Color = clBtnFace
|
||||||
Font.Charset = DEFAULT_CHARSET
|
|
||||||
Font.Color = clWindowText
|
Font.Color = clWindowText
|
||||||
Font.Height = -13
|
Font.Height = -13
|
||||||
Font.Name = 'MS Sans Serif'
|
Font.Name = 'MS Sans Serif'
|
||||||
Font.Style = []
|
|
||||||
OldCreateOrder = True
|
|
||||||
Position = poScreenCenter
|
|
||||||
Scaled = False
|
|
||||||
OnClose = FormClose
|
OnClose = FormClose
|
||||||
OnShow = FormShow
|
OnShow = FormShow
|
||||||
PixelsPerInch = 96
|
Position = poScreenCenter
|
||||||
TextHeight = 16
|
LCLVersion = '2.1.0.0'
|
||||||
|
Scaled = False
|
||||||
object ResourcesCheckList: TCheckListBox
|
object ResourcesCheckList: TCheckListBox
|
||||||
Left = 16
|
Left = 8
|
||||||
|
Height = 160
|
||||||
Top = 8
|
Top = 8
|
||||||
Width = 225
|
Width = 255
|
||||||
Height = 129
|
Align = alClient
|
||||||
ItemHeight = 16
|
Anchors = [akTop, akLeft, akBottom]
|
||||||
|
BorderSpacing.Around = 8
|
||||||
|
Constraints.MinHeight = 140
|
||||||
|
ItemHeight = 0
|
||||||
TabOrder = 0
|
TabOrder = 0
|
||||||
end
|
end
|
||||||
object OKButton: TBitBtn
|
object ButtonPanel1: TButtonPanel
|
||||||
Left = 40
|
Left = 6
|
||||||
Top = 152
|
Height = 34
|
||||||
Width = 75
|
Top = 176
|
||||||
Height = 25
|
Width = 259
|
||||||
|
OKButton.Name = 'OKButton'
|
||||||
|
OKButton.DefaultCaption = True
|
||||||
|
HelpButton.Name = 'HelpButton'
|
||||||
|
HelpButton.DefaultCaption = True
|
||||||
|
CloseButton.Name = 'CloseButton'
|
||||||
|
CloseButton.DefaultCaption = True
|
||||||
|
CancelButton.Name = 'CancelButton'
|
||||||
|
CancelButton.DefaultCaption = True
|
||||||
TabOrder = 1
|
TabOrder = 1
|
||||||
Kind = bkOK
|
ShowButtons = [pbOK, pbCancel]
|
||||||
end
|
|
||||||
object CancelButton: TBitBtn
|
|
||||||
Left = 152
|
|
||||||
Top = 152
|
|
||||||
Width = 75
|
|
||||||
Height = 25
|
|
||||||
TabOrder = 2
|
|
||||||
Kind = bkCancel
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -26,17 +26,21 @@
|
|||||||
|
|
||||||
unit tfShare;
|
unit tfShare;
|
||||||
|
|
||||||
|
{$mode objfpc}{$H+}
|
||||||
|
|
||||||
interface
|
interface
|
||||||
|
|
||||||
uses
|
uses
|
||||||
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
|
SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
|
||||||
StdCtrls, Buttons, checklst;
|
StdCtrls, Buttons, checklst, ButtonPanel;
|
||||||
|
|
||||||
type
|
type
|
||||||
|
|
||||||
|
{ TShare }
|
||||||
|
|
||||||
TShare = class(TForm)
|
TShare = class(TForm)
|
||||||
|
ButtonPanel1: TButtonPanel;
|
||||||
ResourcesCheckList: TCheckListBox;
|
ResourcesCheckList: TCheckListBox;
|
||||||
OKButton: TBitBtn;
|
|
||||||
CancelButton: TBitBtn;
|
|
||||||
procedure FormShow(Sender: TObject);
|
procedure FormShow(Sender: TObject);
|
||||||
procedure FormClose(Sender: TObject; var TheAction: TCloseAction);
|
procedure FormClose(Sender: TObject; var TheAction: TCloseAction);
|
||||||
private
|
private
|
||||||
@ -61,12 +65,12 @@ var
|
|||||||
I : Integer;
|
I : Integer;
|
||||||
begin
|
begin
|
||||||
// First, get the selected appointment
|
// First, get the selected appointment
|
||||||
Appt := PhotoOpMain.JvTFDays1.SelAppt;
|
Appt := MainForm.JvTFDays1.SelAppt;
|
||||||
|
|
||||||
// now roll through the resource list and check all resources
|
// now roll through the resource list and check all resources
|
||||||
// that are found in the appointment's list of schedules.
|
// that are found in the appointment's list of schedules.
|
||||||
With ResourcesCheckList do
|
with ResourcesCheckList do
|
||||||
For I := 0 to Items.Count - 1 do
|
for I := 0 to Items.Count - 1 do
|
||||||
Checked[I] := Appt.IndexOfSchedule(Items[I]) > -1;
|
Checked[I] := Appt.IndexOfSchedule(Items[I]) > -1;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -93,13 +97,13 @@ begin
|
|||||||
If TempList.Count > 0 Then
|
If TempList.Count > 0 Then
|
||||||
// If at least one resource then change the appointment's
|
// If at least one resource then change the appointment's
|
||||||
// schedule list to match the temp list.
|
// schedule list to match the temp list.
|
||||||
PhotoOpMain.JvTFDays1.SelAppt.AssignSchedules(TempList)
|
MainForm.JvTFDays1.SelAppt.AssignSchedules(TempList)
|
||||||
Else
|
Else
|
||||||
If MessageDlg('You have removed this appointment from all schedules.' +
|
If MessageDlg('You have removed this appointment from all schedules.' +
|
||||||
' This will cause the appointment to be deleted.' + #13#10 +
|
' This will cause the appointment to be deleted.' + #13#10 +
|
||||||
'Are you sure this is what you want to do?',
|
'Are you sure this is what you want to do?',
|
||||||
mtConfirmation, [mbYes, mbNo], 0) = mrYes Then
|
mtConfirmation, [mbYes, mbNo], 0) = mrYes Then
|
||||||
With PhotoOpMain.JvTFDays1 do
|
With MainForm.JvTFDays1 do
|
||||||
// Delete the appointment if that is what the user wants to do.
|
// Delete the appointment if that is what the user wants to do.
|
||||||
ScheduleManager.dbDeleteAppt(SelAppt)
|
ScheduleManager.dbDeleteAppt(SelAppt)
|
||||||
Else
|
Else
|
||||||
|
@ -13,41 +13,30 @@ object VisibleResources: TVisibleResources
|
|||||||
LCLVersion = '2.1.0.0'
|
LCLVersion = '2.1.0.0'
|
||||||
Scaled = False
|
Scaled = False
|
||||||
object ResourcesCheckList: TCheckListBox
|
object ResourcesCheckList: TCheckListBox
|
||||||
AnchorSideLeft.Control = Owner
|
Left = 8
|
||||||
AnchorSideTop.Control = Owner
|
Height = 149
|
||||||
AnchorSideRight.Control = Owner
|
Top = 8
|
||||||
AnchorSideRight.Side = asrBottom
|
Width = 255
|
||||||
Left = 16
|
Align = alClient
|
||||||
Height = 129
|
|
||||||
Top = 16
|
|
||||||
Width = 239
|
|
||||||
Anchors = [akTop, akLeft, akRight]
|
Anchors = [akTop, akLeft, akRight]
|
||||||
BorderSpacing.Left = 16
|
BorderSpacing.Around = 8
|
||||||
BorderSpacing.Top = 16
|
|
||||||
BorderSpacing.Right = 16
|
|
||||||
ItemHeight = 0
|
ItemHeight = 0
|
||||||
TabOrder = 0
|
TabOrder = 0
|
||||||
end
|
end
|
||||||
object OKButton: TBitBtn
|
object ButtonPanel1: TButtonPanel
|
||||||
AnchorSideLeft.Control = ResourcesCheckList
|
Left = 6
|
||||||
Left = 40
|
Height = 34
|
||||||
Height = 25
|
Top = 165
|
||||||
Top = 160
|
Width = 259
|
||||||
Width = 75
|
OKButton.Name = 'OKButton'
|
||||||
BorderSpacing.Left = 24
|
OKButton.DefaultCaption = True
|
||||||
Kind = bkOK
|
HelpButton.Name = 'HelpButton'
|
||||||
|
HelpButton.DefaultCaption = True
|
||||||
|
CloseButton.Name = 'CloseButton'
|
||||||
|
CloseButton.DefaultCaption = True
|
||||||
|
CancelButton.Name = 'CancelButton'
|
||||||
|
CancelButton.DefaultCaption = True
|
||||||
TabOrder = 1
|
TabOrder = 1
|
||||||
end
|
ShowButtons = [pbOK, pbCancel]
|
||||||
object CancelButton: TBitBtn
|
|
||||||
AnchorSideRight.Control = ResourcesCheckList
|
|
||||||
AnchorSideRight.Side = asrBottom
|
|
||||||
Left = 156
|
|
||||||
Height = 25
|
|
||||||
Top = 160
|
|
||||||
Width = 75
|
|
||||||
Anchors = [akTop, akRight]
|
|
||||||
BorderSpacing.Right = 24
|
|
||||||
Kind = bkCancel
|
|
||||||
TabOrder = 2
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -31,14 +31,17 @@ unit tfVisibleResources;
|
|||||||
interface
|
interface
|
||||||
|
|
||||||
uses
|
uses
|
||||||
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
|
//Windows, Messages,
|
||||||
StdCtrls, Buttons, checklst;
|
SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
|
||||||
|
StdCtrls, Buttons, checklst, ButtonPanel;
|
||||||
|
|
||||||
type
|
type
|
||||||
|
|
||||||
|
{ TVisibleResources }
|
||||||
|
|
||||||
TVisibleResources = class(TForm)
|
TVisibleResources = class(TForm)
|
||||||
|
ButtonPanel1: TButtonPanel;
|
||||||
ResourcesCheckList: TCheckListBox;
|
ResourcesCheckList: TCheckListBox;
|
||||||
OKButton: TBitBtn;
|
|
||||||
CancelButton: TBitBtn;
|
|
||||||
procedure FormShow(Sender: TObject);
|
procedure FormShow(Sender: TObject);
|
||||||
procedure FormClose(Sender: TObject; var TheAction: TCloseAction);
|
procedure FormClose(Sender: TObject; var TheAction: TCloseAction);
|
||||||
private
|
private
|
||||||
@ -62,7 +65,7 @@ var
|
|||||||
begin
|
begin
|
||||||
// Check the template and check any resources currently
|
// Check the template and check any resources currently
|
||||||
// visible in the grid
|
// visible in the grid
|
||||||
With PhotoOpMain.JvTFDays1.Template do
|
With MainForm.JvTFDays1.Template do
|
||||||
For I := 0 to ResourcesCheckList.Items.Count - 1 do
|
For I := 0 to ResourcesCheckList.Items.Count - 1 do
|
||||||
ResourcesCheckList.Checked[I] :=
|
ResourcesCheckList.Checked[I] :=
|
||||||
CompNames.IndexOf(ResourcesCheckList.Items[I]) > -1;
|
CompNames.IndexOf(ResourcesCheckList.Items[I]) > -1;
|
||||||
@ -76,17 +79,17 @@ begin
|
|||||||
If ModalResult = mrOK Then
|
If ModalResult = mrOK Then
|
||||||
begin
|
begin
|
||||||
// First, clear the old resources from the template
|
// First, clear the old resources from the template
|
||||||
PhotoOpMain.JvTFDays1.Template.CompNames.Clear;
|
MainForm.JvTFDays1.Template.CompNames.Clear;
|
||||||
PhotoOpMain.JvTFWeeks1.SchedNames.Clear;
|
MainForm.JvTFWeeks1.SchedNames.Clear;
|
||||||
PhotoOpMain.JvTFMonths1.SchedNames.Clear;
|
MainForm.JvTFMonths1.SchedNames.Clear;
|
||||||
|
|
||||||
// Next, add the new resources to the template
|
// Next, add the new resources to the template
|
||||||
For I := 0 to ResourcesCheckList.Items.Count - 1 do
|
For I := 0 to ResourcesCheckList.Items.Count - 1 do
|
||||||
If ResourcesCheckList.Checked[I] Then
|
If ResourcesCheckList.Checked[I] Then
|
||||||
begin
|
begin
|
||||||
PhotoOpMain.JvTFDays1.Template.CompNames.Add(ResourcesCheckList.Items[I]);
|
MainForm.JvTFDays1.Template.CompNames.Add(ResourcesCheckList.Items[I]);
|
||||||
PhotoOpMain.JvTFWeeks1.SchedNames.Add(ResourcesCheckList.Items[I]);
|
MainForm.JvTFWeeks1.SchedNames.Add(ResourcesCheckList.Items[I]);
|
||||||
PhotoOpMain.JvTFMonths1.SchedNames.Add(ResourcesCheckList.Items[I]);
|
MainForm.JvTFMonths1.SchedNames.Add(ResourcesCheckList.Items[I]);
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
Reference in New Issue
Block a user