Skip to content

Commit 7c4a507

Browse files
committed
version 3.0.0.1 GitHub release
1 parent b3af808 commit 7c4a507

File tree

7 files changed

+243
-142
lines changed

7 files changed

+243
-142
lines changed

ProgramSetting.pas

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ constructor TPrgSetting.Create();
6363

6464
function TPrgSetting.GetDefaultSettingsFilename(): string;
6565
begin
66-
result := TPath.Combine(GetSettingsFolder(), 'init.json');
66+
result := TPath.Combine(GetSettingsFolder(), 'initMarshall.json');
6767
end;
6868

6969
function TPrgSetting.GetSettingsFolder(): string;

SCM_Marshall.dproj

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
<ProjectVersion>20.1</ProjectVersion>
55
<FrameworkType>FMX</FrameworkType>
66
<Base>True</Base>
7-
<Config Condition="'$(Config)'==''">Debug</Config>
8-
<Platform Condition="'$(Platform)'==''">Win32</Platform>
7+
<Config Condition="'$(Config)'==''">Release</Config>
8+
<Platform Condition="'$(Platform)'==''">Win64</Platform>
99
<TargetedPlatforms>693267</TargetedPlatforms>
1010
<AppType>Application</AppType>
1111
<MainSource>SCM_Marshall.dpr</MainSource>
@@ -257,8 +257,11 @@
257257
<Icon_MainIcon>SCM_Marshall.ico</Icon_MainIcon>
258258
</PropertyGroup>
259259
<PropertyGroup Condition="'$(Cfg_1_Win64)'!=''">
260-
<AppEnableRuntimeThemes>true</AppEnableRuntimeThemes>
261260
<AppDPIAwarenessMode>PerMonitorV2</AppDPIAwarenessMode>
261+
<VerInfo_IncludeVerInfo>true</VerInfo_IncludeVerInfo>
262+
<VerInfo_MajorVer>2</VerInfo_MajorVer>
263+
<VerInfo_Locale>3081</VerInfo_Locale>
264+
<VerInfo_Keys>CompanyName=Artanemus;FileDescription=$(MSBuildProjectName);FileVersion=2.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProgramID=com.embarcadero.$(MSBuildProjectName);ProductName=$(MSBuildProjectName);ProductVersion=2.0;Comments=</VerInfo_Keys>
262265
</PropertyGroup>
263266
<PropertyGroup Condition="'$(Cfg_2)'!=''">
264267
<DCC_LocalDebugSymbols>false</DCC_LocalDebugSymbols>
@@ -275,13 +278,11 @@
275278
<PropertyGroup Condition="'$(Cfg_2_Win64)'!=''">
276279
<AppDPIAwarenessMode>PerMonitorV2</AppDPIAwarenessMode>
277280
<VerInfo_IncludeVerInfo>true</VerInfo_IncludeVerInfo>
278-
<VerInfo_MajorVer>2</VerInfo_MajorVer>
279-
<VerInfo_MinorVer>1</VerInfo_MinorVer>
281+
<VerInfo_MajorVer>3</VerInfo_MajorVer>
280282
<VerInfo_Locale>3081</VerInfo_Locale>
281-
<VerInfo_Keys>CompanyName=Artanemus;FileDescription=$(MSBuildProjectName);FileVersion=2.1.2.2;InternalName=Marshall;LegalCopyright=copyright (c) 2020-2022 Artanemus;LegalTrademarks=;OriginalFilename=;ProgramID=com.embarcadero.$(MSBuildProjectName);ProductName=$(MSBuildProjectName);ProductVersion=2.1;Comments=Rally your swimmers. A Utility for SwimClubMeet.</VerInfo_Keys>
283+
<VerInfo_Keys>CompanyName=Artanemus;FileDescription=$(MSBuildProjectName);FileVersion=3.0.0.1;InternalName=Marshall;LegalCopyright=copyright (c) 2019-2024 Artanemus;LegalTrademarks=;OriginalFilename=SCM_Marshall-R;ProgramID=com.embarcadero.$(MSBuildProjectName);ProductName=$(MSBuildProjectName);ProductVersion=3.0;Comments=Rally your swimmers. Set qualification status. A Utility for SwimClubMeet.</VerInfo_Keys>
282284
<Icon_MainIcon>SCM_Marshall.ico</Icon_MainIcon>
283-
<VerInfo_Release>2</VerInfo_Release>
284-
<VerInfo_Build>2</VerInfo_Build>
285+
<VerInfo_Build>1</VerInfo_Build>
285286
</PropertyGroup>
286287
<ItemGroup>
287288
<DelphiCompile Include="$(MainSource)">

SCM_Marshall.dproj.local

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,12 @@
1111
<Transaction>2024/04/28 10:49:13.000.275,=C:\Users\Ben\Documents\GitHub\x-superobject\XSuperObject.pas</Transaction>
1212
<Transaction>2024/04/28 10:49:13.000.215,=C:\Users\Ben\Documents\GitHub\x-superobject\XSuperJSON.pas</Transaction>
1313
<Transaction>2024/04/28 10:52:08.000.515,=C:\Users\Ben\Documents\GitHub\SCM_Marshall-R\Unit1.pas</Transaction>
14-
<Transaction>2024/04/28 10:52:36.000.635,C:\Users\Ben\Documents\GitHub\SCM_Marshall-R\Unit1.pas=C:\Users\Ben\Documents\GitHub\SCM_Marshall-R\ProgramSetting.pas</Transaction>
15-
<Transaction>2024/04/28 14:20:46.000.185,C:\Users\Ben\Documents\GitHub\SCM_Marshall-R\dlgSCMOptions.fmx=C:\Users\Ben\Documents\GitHub\SCM_Marshall-R\dlgSCMOptions_Depreciated.fmx</Transaction>
16-
<Transaction>2024/04/28 14:20:46.000.185,C:\Users\Ben\Documents\GitHub\SCM_Marshall-R\dlgSCMOptions.pas=C:\Users\Ben\Documents\GitHub\SCM_Marshall-R\dlgSCMOptions_Depreciated.pas</Transaction>
14+
<Transaction>2024/04/28 10:52:36.000.635,C:\Users\Ben\Documents\GitHub\SCM_Marshall-R\ProgramSetting.pas=C:\Users\Ben\Documents\GitHub\SCM_Marshall-R\Unit1.pas</Transaction>
15+
<Transaction>2024/04/28 14:20:46.000.185,C:\Users\Ben\Documents\GitHub\SCM_Marshall-R\dlgSCMOptions_Depreciated.pas=C:\Users\Ben\Documents\GitHub\SCM_Marshall-R\dlgSCMOptions.pas</Transaction>
16+
<Transaction>2024/04/28 14:20:46.000.185,C:\Users\Ben\Documents\GitHub\SCM_Marshall-R\dlgSCMOptions_Depreciated.fmx=C:\Users\Ben\Documents\GitHub\SCM_Marshall-R\dlgSCMOptions.fmx</Transaction>
1717
<Transaction>2024/04/28 14:20:52.000.703,C:\Users\Ben\Documents\GitHub\SCM_Marshall-R\dlgSCMOptions_Depreciated.pas=</Transaction>
1818
<Transaction>2024/05/03 14:09:49.000.351,=C:\Users\Ben\Documents\GitHub\SCM_Marshall-R\Unit1.pas</Transaction>
19-
<Transaction>2024/05/03 14:10:22.000.836,C:\Users\Ben\Documents\GitHub\SCM_Marshall-R\Unit1.pas=C:\Users\Ben\Documents\GitHub\SCM_Marshall-R\DCode.pas</Transaction>
20-
<Transaction>2024/05/04 13:17:40.737,C:\Users\Ben\Documents\GitHub\SCM_Marshall-R\DCode.pas=</Transaction>
19+
<Transaction>2024/05/03 14:10:22.000.836,C:\Users\Ben\Documents\GitHub\SCM_Marshall-R\DCode.pas=C:\Users\Ben\Documents\GitHub\SCM_Marshall-R\Unit1.pas</Transaction>
20+
<Transaction>2024/05/04 13:17:40.000.737,C:\Users\Ben\Documents\GitHub\SCM_Marshall-R\DCode.pas=</Transaction>
2121
</Transactions>
2222
</BorlandProject>

SCM_Marshall.res

448 Bytes
Binary file not shown.

frmMarshall.fmx

Lines changed: 53 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ object Marshall: TMarshall
66
ClientWidth = 847
77
Position = ScreenCenter
88
StyleBook = StyleBook2
9+
Constraints.MinHeight = 578.000000000000000000
10+
Constraints.MinWidth = 847.000000000000000000
911
FormFactor.Width = 320
1012
FormFactor.Height = 480
1113
FormFactor.Devices = [Desktop]
@@ -33,7 +35,7 @@ object Marshall: TMarshall
3335
Size.PlatformDefault = False
3436
StyleLookup = 'TabControl1Style1'
3537
TabHeight = 49.000000000000000000
36-
TabIndex = 2
38+
TabIndex = 0
3739
TabOrder = 0
3840
TabPosition = PlatformDefault
3941
OnChange = TabControl1Change
@@ -53,7 +55,7 @@ object Marshall: TMarshall
5355
TextSettings.Font.Size = 18.000000000000000000
5456
TextSettings.Trimming = None
5557
StyledSettings = [Family, Style, FontColor]
56-
IsSelected = False
58+
IsSelected = True
5759
Margins.Left = 10.000000000000000000
5860
Size.Width = 201.000000000000000000
5961
Size.Height = 49.000000000000000000
@@ -255,14 +257,14 @@ object Marshall: TMarshall
255257
StyledSettings = [Family, FontColor]
256258
Margins.Left = 10.000000000000000000
257259
Position.X = 20.000000000000000000
258-
Position.Y = 88.000000000000000000
260+
Position.Y = 172.399993896484400000
259261
Size.Width = 410.000000000000000000
260262
Size.Height = 22.000000000000000000
261263
Size.PlatformDefault = False
262264
TextSettings.Font.Size = 16.000000000000000000
263265
TextSettings.Font.StyleExt = {00070000000000000004000000}
264266
Text = 'Select Session ...'
265-
TabOrder = 1
267+
TabOrder = 3
266268
TabStop = False
267269
end
268270
object cmbSessionList: TComboBox
@@ -273,13 +275,13 @@ object Marshall: TMarshall
273275
Margins.Right = 4.000000000000000000
274276
Margins.Bottom = 10.000000000000000000
275277
Position.X = 14.800000190734860000
276-
Position.Y = 122.000000000000000000
278+
Position.Y = 206.399993896484400000
277279
Scale.X = 1.200000047683716000
278280
Scale.Y = 1.200000047683716000
279281
Size.Width = 342.000000000000000000
280282
Size.Height = 31.999992370605470000
281283
Size.PlatformDefault = False
282-
TabOrder = 0
284+
TabOrder = 1
283285
OnChange = cmbSessionListChange
284286
end
285287
object chkbSessionVisibility: TCheckBox
@@ -293,7 +295,7 @@ object Marshall: TMarshall
293295
Size.Width = 410.000000000000000000
294296
Size.Height = 19.000000000000000000
295297
Size.PlatformDefault = False
296-
TabOrder = 3
298+
TabOrder = 5
297299
Text = 'Hide locked sessions.'
298300
OnChange = chkbSessionVisibilityChange
299301
end
@@ -307,10 +309,43 @@ object Marshall: TMarshall
307309
Size.Width = 410.000000000000000000
308310
Size.Height = 19.000000000000000000
309311
Size.PlatformDefault = False
310-
TabOrder = 2
312+
TabOrder = 4
311313
Text = 'Use FINA disqualification codes.'
312314
OnChange = chkbUseFINAcodesChange
313315
end
316+
object lblSelectSwimClub: TLabel
317+
Align = Top
318+
AutoSize = True
319+
StyledSettings = [Family, FontColor]
320+
Margins.Left = 10.000000000000000000
321+
Position.X = 20.000000000000000000
322+
Position.Y = 88.000000000000000000
323+
Size.Width = 410.000000000000000000
324+
Size.Height = 22.000000000000000000
325+
Size.PlatformDefault = False
326+
TextSettings.Font.Size = 16.000000000000000000
327+
TextSettings.Font.StyleExt = {00070000000000000004000000}
328+
Text = 'Select Swimming Club ...'
329+
TabOrder = 2
330+
TabStop = False
331+
end
332+
object cmbSwimClubList: TComboBox
333+
Align = Top
334+
DropDownCount = 16
335+
Margins.Left = 4.000000000000000000
336+
Margins.Top = 10.000000000000000000
337+
Margins.Right = 4.000000000000000000
338+
Margins.Bottom = 10.000000000000000000
339+
Position.X = 14.800000190734860000
340+
Position.Y = 122.000000000000000000
341+
Scale.X = 1.200000047683716000
342+
Scale.Y = 1.200000047683716000
343+
Size.Width = 342.000000000000000000
344+
Size.Height = 31.999992370605470000
345+
Size.PlatformDefault = False
346+
TabOrder = 0
347+
OnChange = cmbSwimClubListChange
348+
end
314349
end
315350
end
316351
object tabEventHeat: TTabItem
@@ -434,7 +469,7 @@ object Marshall: TMarshall
434469
TextSettings.Font.Size = 18.000000000000000000
435470
TextSettings.Trimming = None
436471
StyledSettings = [Family, Style, FontColor]
437-
IsSelected = True
472+
IsSelected = False
438473
Margins.Left = 10.000000000000000000
439474
Size.Width = 201.000000000000000000
440475
Size.Height = 49.000000000000000000
@@ -71212,6 +71247,15 @@ object Marshall: TMarshall
7121271247
FillHeaderExpressions = <>
7121371248
FillBreakGroups = <>
7121471249
end
71250+
object LinkListControlToField2: TLinkListControlToField
71251+
Category = 'Quick Bindings'
71252+
DataSource = bsSwimClub
71253+
FieldName = 'Caption'
71254+
Control = cmbSwimClubList
71255+
FillExpressions = <>
71256+
FillHeaderExpressions = <>
71257+
FillBreakGroups = <>
71258+
end
7121571259
end
7121671260
object bsSwimClub: TBindSourceDB
7121771261
DataSet = SCM.tblSwimClub

frmMarshall.pas

Lines changed: 58 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,9 @@ TMarshall = class(TForm)
162162
LinkListControlToField1: TLinkListControlToField;
163163
btnClear: TButton;
164164
actnClearDCode: TAction;
165+
lblSelectSwimClub: TLabel;
166+
cmbSwimClubList: TComboBox;
167+
LinkListControlToField2: TLinkListControlToField;
165168
procedure actnConnectExecute(Sender: TObject);
166169
procedure actnConnectUpdate(Sender: TObject);
167170
procedure actnDisconnectExecute(Sender: TObject);
@@ -177,6 +180,7 @@ TMarshall = class(TForm)
177180
procedure FormDestroy(Sender: TObject);
178181
procedure BigButtonClick(Sender: TObject);
179182
procedure btnClearClick(Sender: TObject);
183+
procedure cmbSwimClubListChange(Sender: TObject);
180184
procedure ListViewEventChange(Sender: TObject);
181185
procedure ListViewHeatChange(Sender: TObject);
182186
procedure ListViewLaneChange(Sender: TObject);
@@ -207,6 +211,7 @@ TMarshall = class(TForm)
207211
public
208212
{ Public declarations }
209213
procedure Refresh_BigButtons;
214+
procedure Refresh_Event;
210215
procedure Refresh_Entrant;
211216
procedure Refresh_Lane;
212217
end;
@@ -507,7 +512,14 @@ procedure TMarshall.chkbUseFINAcodesChange(Sender: TObject);
507512
procedure TMarshall.cmbSessionListChange(Sender: TObject);
508513
begin
509514
if Assigned(SCM) and SCM.scmConnection.Connected then
515+
begin
516+
if SCM.IsActive then
517+
begin
518+
bsEvent.DataSet.First;
519+
bsHeat.DataSet.First;
520+
end;
510521
Update_TabSheetCaptions;
522+
end;
511523
end;
512524

513525
procedure TMarshall.ConnectOnTerminate(Sender: TObject);
@@ -680,6 +692,20 @@ procedure TMarshall.btnClearClick(Sender: TObject);
680692
end
681693
end;
682694

695+
procedure TMarshall.cmbSwimClubListChange(Sender: TObject);
696+
begin
697+
if Assigned(SCM) and SCM.scmConnection.Connected then
698+
begin
699+
if SCM.IsActive then
700+
begin
701+
bsSession.DataSet.First;
702+
bsEvent.DataSet.First;
703+
bsHeat.DataSet.First;
704+
end;
705+
Update_TabSheetCaptions;
706+
end;
707+
end;
708+
683709
procedure TMarshall.ListViewEventChange(Sender: TObject);
684710
begin
685711
Update_TabSheetCaptions;
@@ -759,6 +785,7 @@ procedure TMarshall.TabControl1Change(Sender: TObject);
759785
begin
760786
lblConnectionStatus.Text := '';
761787
Refresh_Lane;
788+
Update_DCode;
762789
// Big buttons are NOT DATA-AWARE. Refresh 'QUALIFICATION STATUS'
763790
Refresh_BigButtons;
764791
end;
@@ -878,11 +905,11 @@ procedure TMarshall.PostFINAcode(ADisqualifyCodeID: integer);
878905
if not SCM.IsActive then
879906
exit;
880907

881-
// if (SCM.qryLane.FieldByName('EntrantID').IsNull) then exit;
882-
// if (SCM.qryLane.FieldByName('EntrantID').AsInteger = 0) then exit;
908+
// L A N E I S E M P T Y .
909+
if (bsLane.DataSet.FieldByName('MemberID').IsNull) then exit;
883910

884911
// Note: only 'OPEN' heats can be modified ...
885-
if not(SCM.qryHeat.FieldByName('HeatStatusID').AsInteger = 1) then
912+
if not(bsHeat.DataSet.FieldByName('HeatStatusID').AsInteger = 1) then
886913
begin
887914
lblConnectionStatus.Text :=
888915
'INFO: Only ''OPEN'' heats can be modified.';
@@ -901,8 +928,6 @@ procedure TMarshall.PostFINAcode(ADisqualifyCodeID: integer);
901928
EntrantID := bsEntrant.DataSet.FieldByName('EntrantID').AsInteger;
902929
rowsEffected := 0;
903930

904-
905-
906931
if (ADisqualifyCodeID > 0) then
907932
begin
908933
// "Simplified Disqualification Schema" :DEFAULT INIT
@@ -921,16 +946,21 @@ procedure TMarshall.PostFINAcode(ADisqualifyCodeID: integer);
921946
SQL := 'UPDATE SwimClubMeet.dbo.Entrant SET' +
922947
' [DisqualifyCodeID] = :ID1, [IsScratched] = :ID2,' +
923948
' [IsDisqualified] = :ID3 WHERE [Entrant].EntrantID = :ID4;';
924-
rowsEffected := SCM.scmConnection.ExecSQL(SQL,
949+
SCM.scmConnection.ExecSQL(SQL,
925950
[ADisqualifyCodeID, IsScratched, IsDisqualified, EntrantID],
926951
[ftInteger, ftBoolean, ftBoolean, ftInteger]);
927952

953+
// TFDConnection.ExecSQL does not directly return the @@ROWCOUNT value
954+
// from SQL Server.
955+
rowsEffected := SCM.scmConnection.ExecSQLScalar('SELECT @@ROWCOUNT');
956+
//
957+
928958
end
929959
else if (EventTypeID = 2) then // TEAM EVENT
930960
begin
931961
// team events not enabled ....
932962
{
933-
SQL := 'UPDATE SwimClubMeet.dbo.Team SET' +
963+
SQL := 'SET NOCOUNT OFF; UPDATE SwimClubMeet.dbo.Team SET' +
934964
' [DisqualifyCodeID] = :ID1, [IsScratched] = :ID2,' +
935965
' [IsDisqualified] = :ID3 WHERE [Team].TeamID = :ID4;';
936966
SCM.scmConnection.ExecSQL(SQL, [ADisqualifyCodeID, IsScratched, IsDisqualified, fTeamID],
@@ -946,13 +976,14 @@ procedure TMarshall.PostFINAcode(ADisqualifyCodeID: integer);
946976
SQL := 'UPDATE SwimClubMeet.dbo.Entrant SET' +
947977
' [DisqualifyCodeID] = NULL, [IsScratched] = 0,' +
948978
' [IsDisqualified] = 0 WHERE [Entrant].EntrantID = :ID4;';
949-
rowsEffected := SCM.scmConnection.ExecSQL(SQL, [EntrantID], [ftInteger]);
979+
SCM.scmConnection.ExecSQL(SQL, [EntrantID], [ftInteger]);
980+
rowsEffected := SCM.scmConnection.ExecSQLScalar('SELECT @@ROWCOUNT');
950981
end
951982
else if (EventTypeID = 2) then // TEAM EVENT
952983
begin
953984
// team events not enabled ....
954985
{
955-
SQL := 'UPDATE SwimClubMeet.dbo.Team SET' +
986+
SQL := 'SET NOCOUNT OFF; UPDATE SwimClubMeet.dbo.Team SET' +
956987
' [DisqualifyCodeID] = NULL, [IsScratched] = 0,' +
957988
' [IsDisqualified] = 0 WHERE [Team].TeamID = :ID4;';
958989
SCM.scmConnection.ExecSQL(SQL, [fTeamID], [ftInteger]);
@@ -1212,6 +1243,24 @@ procedure TMarshall.Refresh_Entrant;
12121243
end;
12131244
end;
12141245

1246+
procedure TMarshall.Refresh_Event;
1247+
var
1248+
EventID: Integer;
1249+
begin
1250+
if (Assigned(SCM) and SCM.IsActive) then
1251+
begin
1252+
SCM.qryEvent.DisableControls;
1253+
// SAFE: if dataset is empty or no swimmer assigned, EventID will equal zero.
1254+
EventID := SCM.qryEvent.FieldByName('EventID').AsInteger;
1255+
// qryLane was trashed :: full requery required
1256+
SCM.qryEvent.Close;
1257+
SCM.qryEvent.Open;
1258+
// SAFE: ZERO values.
1259+
SCM.LocateEventID(EventID);
1260+
SCM.qryEvent.EnableControls;
1261+
end;
1262+
end;
1263+
12151264
procedure TMarshall.Refresh_BigButtons();
12161265
var
12171266
QualifyStatus: Integer;

0 commit comments

Comments
 (0)