Skip to content

Commit 216c7b0

Browse files
committed
-- Removed SQL Server support for OLA [deprecated]
-- Allowing IOF XML relay startlist without starttimes for all runners -- Bib-numbers for relay runners for OLA -- SSFTiming fix for Gun-start -- Updated mysql.data to version 8
1 parent c1c63c8 commit 216c7b0

23 files changed

+17557
-24
lines changed

LiveResults.Client.Tests/LiveResults.Client.Tests.csproj

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?xml version="1.0" encoding="utf-8"?>
2-
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
2+
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
33
<PropertyGroup>
44
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
55
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
@@ -11,7 +11,7 @@
1111
<AppDesignerFolder>Properties</AppDesignerFolder>
1212
<RootNamespace>LiveResults.Client.Tests</RootNamespace>
1313
<AssemblyName>LiveResults.Client.Tests</AssemblyName>
14-
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
14+
<TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion>
1515
<FileAlignment>512</FileAlignment>
1616
<ProjectTypeGuids>{3AC096D0-A1C2-E12C-1390-A8335801FDAB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
1717
<SccProjectName>
@@ -22,6 +22,7 @@
2222
</SccAuxPath>
2323
<SccProvider>
2424
</SccProvider>
25+
<TargetFrameworkProfile />
2526
</PropertyGroup>
2627
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
2728
<DebugSymbols>true</DebugSymbols>
@@ -31,6 +32,7 @@
3132
<DefineConstants>DEBUG;TRACE</DefineConstants>
3233
<ErrorReport>prompt</ErrorReport>
3334
<WarningLevel>4</WarningLevel>
35+
<Prefer32Bit>false</Prefer32Bit>
3436
</PropertyGroup>
3537
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
3638
<DebugType>pdbonly</DebugType>
@@ -39,6 +41,7 @@
3941
<DefineConstants>TRACE</DefineConstants>
4042
<ErrorReport>prompt</ErrorReport>
4143
<WarningLevel>4</WarningLevel>
44+
<Prefer32Bit>false</Prefer32Bit>
4245
</PropertyGroup>
4346
<ItemGroup>
4447
<Reference Include="nunit.framework">

LiveResults.Client/App.config

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,4 @@
1010
<add key="emmaServer2" value="54.247.102.48;liveresultat;web;liveresultat"/>-->
1111

1212
</appSettings>
13-
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/></startup></configuration>
13+
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5.2"/></startup></configuration>

LiveResults.Client/LiveResults.Client.csproj

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?xml version="1.0" encoding="utf-8"?>
2-
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="4.0">
2+
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="12.0">
33
<PropertyGroup>
44
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
55
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
@@ -24,7 +24,7 @@
2424
<SignAssembly>false</SignAssembly>
2525
<AssemblyOriginatorKeyFile>
2626
</AssemblyOriginatorKeyFile>
27-
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
27+
<TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion>
2828
<PublishUrl>c:\OpenSource\EmmaPublishCombined\</PublishUrl>
2929
<Install>true</Install>
3030
<InstallFrom>Web</InstallFrom>
@@ -63,6 +63,7 @@
6363
<WarningLevel>4</WarningLevel>
6464
<PlatformTarget>AnyCPU</PlatformTarget>
6565
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
66+
<Prefer32Bit>false</Prefer32Bit>
6667
</PropertyGroup>
6768
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
6869
<DebugType>pdbonly</DebugType>
@@ -72,6 +73,7 @@
7273
<ErrorReport>prompt</ErrorReport>
7374
<WarningLevel>4</WarningLevel>
7475
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
76+
<Prefer32Bit>false</Prefer32Bit>
7577
</PropertyGroup>
7678
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'DebugOLA|AnyCPU' ">
7779
<DebugSymbols>true</DebugSymbols>
@@ -81,6 +83,7 @@
8183
<PlatformTarget>AnyCPU</PlatformTarget>
8284
<ErrorReport>prompt</ErrorReport>
8385
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
86+
<Prefer32Bit>false</Prefer32Bit>
8487
</PropertyGroup>
8588
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'ReleaseOLA|AnyCPU' ">
8689
<OutputPath>bin\ReleaseOLA\</OutputPath>
@@ -90,6 +93,7 @@
9093
<PlatformTarget>AnyCPU</PlatformTarget>
9194
<ErrorReport>prompt</ErrorReport>
9295
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
96+
<Prefer32Bit>false</Prefer32Bit>
9397
</PropertyGroup>
9498
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'ReleaseOS|AnyCPU' ">
9599
<OutputPath>bin\ReleaseOS\</OutputPath>
@@ -99,6 +103,7 @@
99103
<PlatformTarget>AnyCPU</PlatformTarget>
100104
<ErrorReport>prompt</ErrorReport>
101105
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
106+
<Prefer32Bit>false</Prefer32Bit>
102107
</PropertyGroup>
103108
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'DebugOS|AnyCPU' ">
104109
<DebugSymbols>true</DebugSymbols>
@@ -108,6 +113,7 @@
108113
<PlatformTarget>AnyCPU</PlatformTarget>
109114
<ErrorReport>prompt</ErrorReport>
110115
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
116+
<Prefer32Bit>false</Prefer32Bit>
111117
</PropertyGroup>
112118
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'DebugOE|AnyCPU' ">
113119
<DebugSymbols>true</DebugSymbols>
@@ -117,6 +123,7 @@
117123
<PlatformTarget>AnyCPU</PlatformTarget>
118124
<ErrorReport>prompt</ErrorReport>
119125
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
126+
<Prefer32Bit>false</Prefer32Bit>
120127
</PropertyGroup>
121128
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'DebugSIT|AnyCPU' ">
122129
<DebugSymbols>true</DebugSymbols>
@@ -126,6 +133,7 @@
126133
<PlatformTarget>AnyCPU</PlatformTarget>
127134
<ErrorReport>prompt</ErrorReport>
128135
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
136+
<Prefer32Bit>false</Prefer32Bit>
129137
</PropertyGroup>
130138
<ItemGroup>
131139
<Reference Include="MySql.Data, Version=6.2.2.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d, processorArchitecture=MSIL">

LiveResults.Client/NewOLAComp.cs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ public partial class NewOLAComp : Form
2121
public NewOLAComp()
2222
{
2323
InitializeComponent();
24-
comboBox1.DataSource = new string[] { "OLA Intern Databas", "Mysql-Server", "SQL-Server" };
24+
comboBox1.DataSource = new string[] { "OLA Intern Databas", "Mysql-Server"};
2525
comboBox1.SelectedIndex = 1;
2626
txtUser.Text = "live";
2727
txtPw.Text = "live";
@@ -193,9 +193,8 @@ private void wizardPage2_ShowFromNext(object sender, EventArgs e)
193193
conn = GetDBConnection();
194194
if (conn != null)
195195
{
196-
conn.Open();
197196
lstDB.DataSource = null;
198-
197+
conn.Open();
199198
string[] databases = GetDatabases(conn);
200199
lstDB.DataSource = databases;
201200
}
@@ -242,7 +241,7 @@ private string[] GetDatabases(IDbConnection conn)
242241
}
243242
return dbs.ToArray();
244243
}
245-
244+
246245
private IDbConnection GetDBConnection()
247246
{
248247
return GetDBConnection(null);

LiveResults.Client/Parsers/IofXmlV3Parser.cs

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,9 @@ public static Runner[] ParseXmlData(XmlDocument xmlDoc, LogMessageDelegate logit
5454
string leg = legNode.InnerText;
5555

5656
var startTimeNode = teamMemberStartNode.SelectSingleNode("iof:Start/iof:StartTime", nsMgr);
57-
if (startTimeNode == null)
58-
continue;
59-
string starttime = startTimeNode.InnerText;
57+
string starttime = "";
58+
if (startTimeNode != null)
59+
starttime = startTimeNode.InnerText;
6060

6161
var runner = new Runner(-1, name, teamName, className + "-" + leg);
6262

@@ -65,6 +65,10 @@ public static Runner[] ParseXmlData(XmlDocument xmlDoc, LogMessageDelegate logit
6565
int istarttime = ParseTime(starttime);
6666
runner.SetStartTime(istarttime);
6767
}
68+
else
69+
{
70+
runner.SetResult(-9, 9);
71+
}
6872

6973
runners.Add(runner);
7074
}

LiveResults.Client/Parsers/OlaParser.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -328,7 +328,7 @@ time is seconds * 100
328328

329329
if (isRelay)
330330
{
331-
relayEventCache.SetTeamLegResult(runnerID, classN, club, fName + " " + famName, Convert.ToInt32(reader["relayLeg"].ToString()),
331+
relayEventCache.SetTeamLegResult(runnerID, classN, club, bib, fName + " " + famName, Convert.ToInt32(reader["relayLeg"].ToString()),
332332
iStartTime, time, rstatus);
333333
}
334334
else
@@ -518,7 +518,7 @@ time is seconds * 100
518518

519519
if (isRelay)
520520
{
521-
relayEventCache.SetTeamLegSplitResult(entryid, classn, club, name, Convert.ToInt32(reader["relayLeg"].ToString()), (int)startTime.TimeOfDay.TotalSeconds * 100, sCont, (int)time, passedCount);
521+
relayEventCache.SetTeamLegSplitResult(entryid, classn, club, bib, name, Convert.ToInt32(reader["relayLeg"].ToString()), (int)startTime.TimeOfDay.TotalSeconds * 100, sCont, (int)time, passedCount);
522522
}
523523
else
524524
{

LiveResults.Client/Parsers/SSFTimingParser.cs

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ public class SSFTimingParser : IExternalSystemResultParser
2121
private bool m_continue;
2222
private bool m_useTenth = false;
2323
private bool m_anynomousSplits = false;
24-
int baseNum = 30000;
24+
int baseNum = 10000;
2525
public SSFTimingParser(IDbConnection conn, int eventID, bool recreateRadioControls = true, bool anynomousSplits=false)
2626
{
2727
m_connection = conn;
@@ -324,13 +324,13 @@ left outer join dbRuns on (dbRuns.RaceID = {0} and dbRuns.StartNo = dbName.Start
324324
{
325325
cmd.CommandText = initialCommand +
326326
string.Format(
327-
@" and dbName.Startno in (select distinct startno from dbLog where raceId={0} and logid > {1})", m_eventID,
327+
@" and dbName.Startno in (select distinct startno from dbLog where raceId={0} and logid > {1} and isnumeric(startno)=1)", m_eventID,
328328
lastId);
329329
ParseReader(cmd, out lastRunner, isRelay, relayLegs);
330330

331331
cmdSplits.CommandText = initialSplitCommand +
332332
string.Format(
333-
@" and dbName.Startno in (select distinct startno from dbLog where raceId={0} and logid > {1})", m_eventID,
333+
@" and dbName.Startno in (select distinct startno from dbLog where raceId={0} and logid > {1} and isnumeric(startno)=1)", m_eventID,
334334
lastId);
335335
ParseReaderSplits(cmdSplits, out lastRunner, isRelay, relayLegs);
336336
}
@@ -384,6 +384,9 @@ private void ParseReader(IDbCommand cmd, out string lastRunner, bool isRelay, Di
384384
string bibNumber = reader["startno"].ToString();
385385
try
386386
{
387+
388+
/* if (!int.TryParse(reader["startno"] as string, out int sn))
389+
continue;*/
387390
runnerID = Convert.ToInt32(reader["startno"].ToString());
388391
if (baseNum > 0)
389392
runnerID = baseNum + runnerID;
@@ -518,6 +521,8 @@ private void ParseReaderSplits(IDbCommand cmd, out string lastRunner, bool isRel
518521
int time = -2;
519522
int status = 0;
520523
var splits = new List<ResultStruct>();
524+
/*if (!int.TryParse(reader["startno"] as string, out int sn))
525+
continue;*/
521526
string bibNumber = reader["startno"].ToString();
522527
try
523528
{

LiveResults.Client/Properties/Resources.Designer.cs

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

LiveResults.Client/Properties/Settings.Designer.cs

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

LiveResults.Model/LiveResults.Model.csproj

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,9 @@
99
<AppDesignerFolder>Properties</AppDesignerFolder>
1010
<RootNamespace>LiveResults.Model</RootNamespace>
1111
<AssemblyName>LiveResults.Model</AssemblyName>
12-
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
12+
<TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion>
1313
<FileAlignment>512</FileAlignment>
14+
<TargetFrameworkProfile />
1415
</PropertyGroup>
1516
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
1617
<DebugSymbols>true</DebugSymbols>
@@ -20,6 +21,7 @@
2021
<DefineConstants>DEBUG;TRACE</DefineConstants>
2122
<ErrorReport>prompt</ErrorReport>
2223
<WarningLevel>4</WarningLevel>
24+
<Prefer32Bit>false</Prefer32Bit>
2325
</PropertyGroup>
2426
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
2527
<DebugType>pdbonly</DebugType>
@@ -28,6 +30,7 @@
2830
<DefineConstants>TRACE</DefineConstants>
2931
<ErrorReport>prompt</ErrorReport>
3032
<WarningLevel>4</WarningLevel>
33+
<Prefer32Bit>false</Prefer32Bit>
3134
</PropertyGroup>
3235
<ItemGroup>
3336
<Reference Include="MySql.Data">

LiveResults.Model/Model/TeamHolder.cs

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ public class RelayEventCache
6161

6262
private readonly Dictionary<string,Dictionary<string,TeamHolder>> m_cache = new Dictionary<string, Dictionary<string, TeamHolder>>();
6363

64-
public void SetTeamLegSplitResult(int dbId, string className, string teamName, string runnerName, int leg, int startTime, int controlCode, int time, int passCounter)
64+
public void SetTeamLegSplitResult(int dbId, string className, string teamName,string bib, string runnerName, int leg, int startTime, int controlCode, int time, int passCounter)
6565
{
6666
if (!m_cache.ContainsKey(className))
6767
{
@@ -73,7 +73,8 @@ public void SetTeamLegSplitResult(int dbId, string className, string teamName, s
7373
{
7474
ClassName = className,
7575
Legs = new TeamLegHolder[0],
76-
TeamName = teamName
76+
TeamName = teamName,
77+
Bib = bib
7778
});
7879
}
7980

@@ -119,7 +120,7 @@ public void SetTeamLegSplitResult(int dbId, string className, string teamName, s
119120
TriggerUpdateOnTeamRunners(className, teamName, leg);
120121
}
121122

122-
public void SetTeamLegResult(int dbId, string className, string teamName, string runnerName, int leg, int startTime, int time, int status)
123+
public void SetTeamLegResult(int dbId, string className, string teamName,string bib, string runnerName, int leg, int startTime, int time, int status)
123124
{
124125
if (!m_cache.ContainsKey(className))
125126
{
@@ -130,7 +131,8 @@ public void SetTeamLegResult(int dbId, string className, string teamName, string
130131
m_cache[className].Add(teamName, new TeamHolder{
131132
ClassName = className,
132133
Legs = new TeamLegHolder[0],
133-
TeamName = teamName
134+
TeamName = teamName,
135+
Bib = bib
134136
});
135137
}
136138

@@ -174,6 +176,7 @@ private void TriggerUpdateOnTeamRunners(string className, string teamName, int l
174176
RunnerName = legItem.RunnerName,
175177
SplitTimes = GetSplitTimes(team,legItem,classConfig),
176178
StartTime = legItem.StartTime,
179+
bib = team.Bib
177180
};
178181
res.Status = m_cache[className][teamName].GetTeamTotalStatusAfterLeg(legItem.Leg);
179182
if (legItem.Status == 10)
@@ -214,6 +217,7 @@ public class TeamHolder
214217
{
215218
public string ClassName { get; set; }
216219
public string TeamName { get; set; }
220+
public string Bib { get; set; }
217221
public TeamLegHolder[] Legs { get; set; }
218222

219223
public int GetTeamTotalStatusAfterLeg(int leg)

References/BouncyCastle.Crypto.dll

2.41 MB
Binary file not shown.

References/Google.Protobuf.dll

393 KB
Binary file not shown.
32.5 KB
Binary file not shown.

References/K4os.Compression.LZ4.dll

59 KB
Binary file not shown.

References/K4os.Hash.xxHash.dll

12 KB
Binary file not shown.

References/MySql.Data.dll

972 KB
Binary file not shown.

0 commit comments

Comments
 (0)