Skip to content

Commit f15c92b

Browse files
[FIX] login dialog; fixes #1409 and #1410
* [Fix] Login dialog problems * Minor changes in UI * Upgrade SDK and Bump version number * Final fix and finetuning
1 parent b042d3d commit f15c92b

71 files changed

Lines changed: 1438 additions & 499 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

BasicRdl.Tests/BasicRdl.Tests.csproj

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,9 @@
3030
</PropertyGroup>
3131
<ItemGroup>
3232
<PackageReference Include="Castle.Core" Version="5.2.1" />
33-
<PackageReference Include="CDP4Common-CE" Version="30.0.1" />
34-
<PackageReference Include="CDP4Dal-CE" Version="30.0.1" />
35-
<PackageReference Include="CDP4JsonSerializer-CE" Version="30.0.1" />
33+
<PackageReference Include="CDP4Common-CE" Version="30.1.1" />
34+
<PackageReference Include="CDP4Dal-CE" Version="30.1.1" />
35+
<PackageReference Include="CDP4JsonSerializer-CE" Version="30.1.1" />
3636
<PackageReference Include="CommonServiceLocator" Version="2.0.7" />
3737
<PackageReference Include="DotLiquid" Version="2.3.197" />
3838
<PackageReference Include="Newtonsoft.Json" Version="13.0.4" />

BasicRdl/BasicRdl.csproj

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@
1010
<Product>BasicRdl</Product>
1111
<Description>CDP4-COMET Basic Reference Data Library Plugin</Description>
1212
<Copyright>Copyright © Starion Group S.A.</Copyright>
13-
<AssemblyVersion>11.0.0.12</AssemblyVersion>
14-
<FileVersion>11.0.0.12</FileVersion>
13+
<AssemblyVersion>11.0.0.13</AssemblyVersion>
14+
<FileVersion>11.0.0.13</FileVersion>
1515
<UseWPF>true</UseWPF>
1616
<UseWindowsForms>true</UseWindowsForms>
1717
</PropertyGroup>
@@ -37,13 +37,13 @@
3737
</PropertyGroup>
3838
<Import Project="..\Sdk.Plugin.target" />
3939
<ItemGroup>
40-
<PackageReference Include="CDP4Common-CE" Version="30.0.1">
40+
<PackageReference Include="CDP4Common-CE" Version="30.1.1">
4141
<ExcludeAssets>runtime</ExcludeAssets>
4242
</PackageReference>
43-
<PackageReference Include="CDP4Dal-CE" Version="30.0.1">
43+
<PackageReference Include="CDP4Dal-CE" Version="30.1.1">
4444
<ExcludeAssets>runtime</ExcludeAssets>
4545
</PackageReference>
46-
<PackageReference Include="CDP4JsonSerializer-CE" Version="30.0.1">
46+
<PackageReference Include="CDP4JsonSerializer-CE" Version="30.1.1">
4747
<ExcludeAssets>runtime</ExcludeAssets>
4848
</PackageReference>
4949
<PackageReference Include="CommonServiceLocator" Version="2.0.7">

CDP4Addin.Tests/CDP4Addin.Tests.csproj

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,9 @@
2929
</PropertyGroup>
3030
<ItemGroup>
3131
<PackageReference Include="Castle.Core" Version="5.2.1" />
32-
<PackageReference Include="CDP4Common-CE" Version="30.0.1" />
33-
<PackageReference Include="CDP4Dal-CE" Version="30.0.1" />
34-
<PackageReference Include="CDP4JsonSerializer-CE" Version="30.0.1" />
32+
<PackageReference Include="CDP4Common-CE" Version="30.1.1" />
33+
<PackageReference Include="CDP4Dal-CE" Version="30.1.1" />
34+
<PackageReference Include="CDP4JsonSerializer-CE" Version="30.1.1" />
3535
<PackageReference Include="CommonServiceLocator" Version="2.0.7" />
3636
<PackageReference Include="Microsoft.AspNet.WebApi.Client" Version="6.0.0" />
3737
<PackageReference Include="NetOfficeFw.Core" Version="1.9.9" />

CDP4Addin/CDP4Addin.csproj

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@
1010
<Product>CDP4AddinCE</Product>
1111
<Description>CDP4-COMET-CE Office Plugin</Description>
1212
<Copyright>Copyright © Starion Group S.A.</Copyright>
13-
<AssemblyVersion>11.0.0.12</AssemblyVersion>
14-
<FileVersion>11.0.0.12</FileVersion>
13+
<AssemblyVersion>11.0.0.13</AssemblyVersion>
14+
<FileVersion>11.0.0.13</FileVersion>
1515
<RegisterForComInterop>true</RegisterForComInterop>
1616
<PlatformTarget>anycpu</PlatformTarget>
1717
</PropertyGroup>
@@ -34,9 +34,9 @@
3434
<OutputPath>bin\$(Configuration)\</OutputPath>
3535
</PropertyGroup>
3636
<ItemGroup>
37-
<PackageReference Include="CDP4Common-CE" Version="30.0.1" />
38-
<PackageReference Include="CDP4Dal-CE" Version="30.0.1" />
39-
<PackageReference Include="CDP4JsonSerializer-CE" Version="30.0.1" />
37+
<PackageReference Include="CDP4Common-CE" Version="30.1.1" />
38+
<PackageReference Include="CDP4Dal-CE" Version="30.1.1" />
39+
<PackageReference Include="CDP4JsonSerializer-CE" Version="30.1.1" />
4040
<PackageReference Include="CommonServiceLocator" Version="2.0.7" />
4141
<PackageReference Include="DevExpress.CodeParser" Version="23.2.5" />
4242
<PackageReference Include="DevExpress.Data" Version="23.2.5" />

CDP4Budget.Tests/CDP4Budget.Tests.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@
1616
</PropertyGroup>
1717
<ItemGroup>
1818
<PackageReference Include="Castle.Core" Version="5.2.1" />
19-
<PackageReference Include="CDP4Common-CE" Version="30.0.1" />
20-
<PackageReference Include="CDP4Dal-CE" Version="30.0.1" />
19+
<PackageReference Include="CDP4Common-CE" Version="30.1.1" />
20+
<PackageReference Include="CDP4Dal-CE" Version="30.1.1" />
2121
<PackageReference Include="Newtonsoft.Json" Version="13.0.4" />
2222
<PackageReference Include="NLog" Version="6.1.2" />
2323
<PackageReference Include="NLog.Extensions.Logging" Version="6.1.2" />

CDP4BudgetViewer/CDP4Budget.csproj

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88
<Product>CDP4BudgetViewer</Product>
99
<Description>CDP4-COMET Budget Computation and Viewer Plugin</Description>
1010
<Copyright>Copyright © Starion Group S.A.</Copyright>
11-
<AssemblyVersion>11.0.0.12</AssemblyVersion>
12-
<FileVersion>11.0.0.12</FileVersion>
11+
<AssemblyVersion>11.0.0.13</AssemblyVersion>
12+
<FileVersion>11.0.0.13</FileVersion>
1313
<UseWPF>true</UseWPF>
1414
<UseWindowsForms>true</UseWindowsForms>
1515
</PropertyGroup>
@@ -35,10 +35,10 @@
3535
</PropertyGroup>
3636
<Import Project="..\Sdk.Plugin.target" />
3737
<ItemGroup>
38-
<PackageReference Include="CDP4Common-CE" Version="30.0.1">
38+
<PackageReference Include="CDP4Common-CE" Version="30.1.1">
3939
<ExcludeAssets>runtime</ExcludeAssets>
4040
</PackageReference>
41-
<PackageReference Include="CDP4Dal-CE" Version="30.0.1">
41+
<PackageReference Include="CDP4Dal-CE" Version="30.1.1">
4242
<ExcludeAssets>runtime</ExcludeAssets>
4343
</PackageReference>
4444
<PackageReference Include="DevExpress.CodeParser" Version="23.2.5">

CDP4BuiltInRules.Tests/CDP4BuiltInRules.Tests.csproj

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,9 @@
2828
</PropertyGroup>
2929
<ItemGroup>
3030
<PackageReference Include="Castle.Core" Version="5.2.1" />
31-
<PackageReference Include="CDP4Common-CE" Version="30.0.1" />
32-
<PackageReference Include="CDP4Dal-CE" Version="30.0.1" />
33-
<PackageReference Include="CDP4JsonSerializer-CE" Version="30.0.1" />
31+
<PackageReference Include="CDP4Common-CE" Version="30.1.1" />
32+
<PackageReference Include="CDP4Dal-CE" Version="30.1.1" />
33+
<PackageReference Include="CDP4JsonSerializer-CE" Version="30.1.1" />
3434
<PackageReference Include="CommonServiceLocator" Version="2.0.7" />
3535
<PackageReference Include="Newtonsoft.Json" Version="13.0.4" />
3636
<PackageReference Include="NLog" Version="6.1.2" />

CDP4BuiltInRules/CDP4BuiltInRules.csproj

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@
1010
<Product>CDP4BuiltInRules</Product>
1111
<Description>CDP4-COMET Built-In rules Plugin</Description>
1212
<Copyright>Copyright © Starion Group S.A.</Copyright>
13-
<AssemblyVersion>11.0.0.12</AssemblyVersion>
14-
<FileVersion>11.0.0.12</FileVersion>
13+
<AssemblyVersion>11.0.0.13</AssemblyVersion>
14+
<FileVersion>11.0.0.13</FileVersion>
1515
<UseWPF>true</UseWPF>
1616
<UseWindowsForms>true</UseWindowsForms>
1717
</PropertyGroup>
@@ -37,13 +37,13 @@
3737
</PropertyGroup>
3838
<Import Project="..\Sdk.Plugin.target" />
3939
<ItemGroup>
40-
<PackageReference Include="CDP4Common-CE" Version="30.0.1">
40+
<PackageReference Include="CDP4Common-CE" Version="30.1.1">
4141
<ExcludeAssets>runtime</ExcludeAssets>
4242
</PackageReference>
43-
<PackageReference Include="CDP4Dal-CE" Version="30.0.1">
43+
<PackageReference Include="CDP4Dal-CE" Version="30.1.1">
4444
<ExcludeAssets>runtime</ExcludeAssets>
4545
</PackageReference>
46-
<PackageReference Include="CDP4JsonSerializer-CE" Version="30.0.1">
46+
<PackageReference Include="CDP4JsonSerializer-CE" Version="30.1.1">
4747
<ExcludeAssets>runtime</ExcludeAssets>
4848
</PackageReference>
4949
<PackageReference Include="DevExpress.Charts" Version="23.2.5">

CDP4Composition.Tests/CDP4Composition.Tests.csproj

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,10 @@
3131
</PropertyGroup>
3232

3333
<ItemGroup>
34-
<PackageReference Include="CDP4Common-CE" Version="30.0.1" />
35-
<PackageReference Include="CDP4Dal-CE" Version="30.0.1" />
36-
<PackageReference Include="CDP4JsonSerializer-CE" Version="30.0.1" />
37-
<PackageReference Include="CDP4RequirementsVerification-CE" Version="30.0.1" />
34+
<PackageReference Include="CDP4Common-CE" Version="30.1.1" />
35+
<PackageReference Include="CDP4Dal-CE" Version="30.1.1" />
36+
<PackageReference Include="CDP4JsonSerializer-CE" Version="30.1.1" />
37+
<PackageReference Include="CDP4RequirementsVerification-CE" Version="30.1.1" />
3838
<PackageReference Include="CommonServiceLocator" Version="2.0.7" />
3939
<PackageReference Include="Microsoft.Xaml.Behaviors.Wpf" Version="1.1.142" />
4040
<PackageReference Include="Newtonsoft.Json" Version="13.0.4" />
Lines changed: 161 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,161 @@
1+
// --------------------------------------------------------------------------------------------------------------------
2+
// <copyright file="SingleConcurrentActionRunnerTestFixture.cs" company="Starion Group S.A.">
3+
// Copyright (c) 2015-2025 Starion Group S.A.
4+
//
5+
// Author: Sam Gerené, Alex Vorobiev, Alexander van Delft, Nathanael Smiechowski, Antoine Théate, Omar Elebiary
6+
//
7+
// This file is part of CDP4-COMET-IME Community Edition.
8+
// The CDP4-COMET-IME Community Edition is the Starion Concurrent Design Desktop Application and Excel Integration
9+
// compliant with ECSS-E-TM-10-25 Annex A and Annex C.
10+
//
11+
// The CDP4-COMET-IME Community Edition is free software; you can redistribute it and/or
12+
// modify it under the terms of the GNU Affero General Public
13+
// License as published by the Free Software Foundation; either
14+
// version 3 of the License, or any later version.
15+
//
16+
// The CDP4-COMET-IME Community Edition is distributed in the hope that it will be useful,
17+
// but WITHOUT ANY WARRANTY; without even the implied warranty of
18+
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19+
// GNU Affero General Public License for more details.
20+
//
21+
// You should have received a copy of the GNU Affero General Public License
22+
// along with this program. If not, see <http://www.gnu.org/licenses/>.
23+
// </copyright>
24+
// --------------------------------------------------------------------------------------------------------------------
25+
26+
namespace CDP4Composition.Tests.Utilities
27+
{
28+
using System;
29+
using System.Diagnostics;
30+
using System.Threading;
31+
using System.Threading.Tasks;
32+
33+
using CDP4Composition.Utilities;
34+
35+
using NUnit.Framework;
36+
37+
/// <summary>
38+
/// Suite of tests for the <see cref="SingleConcurrentActionRunner"/> class
39+
/// </summary>
40+
[TestFixture]
41+
public class SingleConcurrentActionRunnerTestFixture
42+
{
43+
/// <summary>
44+
/// Polls a condition until it becomes true or the timeout elapses.
45+
/// </summary>
46+
private static async Task WaitUntilAsync(Func<bool> condition, int timeoutMilliseconds = 5000)
47+
{
48+
var stopwatch = Stopwatch.StartNew();
49+
50+
while (!condition() && stopwatch.ElapsedMilliseconds < timeoutMilliseconds)
51+
{
52+
await Task.Delay(20);
53+
}
54+
}
55+
56+
[Test]
57+
public async Task Verify_that_DelayRunTaskWithInnerCancellationToken_executes_the_func_after_the_delay()
58+
{
59+
var runner = new SingleConcurrentActionRunner();
60+
var executed = false;
61+
62+
runner.DelayRunTaskWithInnerCancellationToken(
63+
_ =>
64+
{
65+
executed = true;
66+
return Task.CompletedTask;
67+
},
68+
50);
69+
70+
Assert.That(executed, Is.False, "the func should not be invoked synchronously");
71+
72+
await WaitUntilAsync(() => executed);
73+
74+
Assert.That(executed, Is.True, "the func should be invoked after the delay");
75+
}
76+
77+
[Test]
78+
public async Task Verify_that_DelayRunTaskWithInnerCancellationToken_passes_a_non_cancelled_token_to_the_func()
79+
{
80+
var runner = new SingleConcurrentActionRunner();
81+
var wasCancellationRequested = true;
82+
var executed = false;
83+
84+
runner.DelayRunTaskWithInnerCancellationToken(
85+
token =>
86+
{
87+
wasCancellationRequested = token.IsCancellationRequested;
88+
executed = true;
89+
return Task.CompletedTask;
90+
},
91+
50);
92+
93+
await WaitUntilAsync(() => executed);
94+
95+
Assert.That(executed, Is.True);
96+
Assert.That(wasCancellationRequested, Is.False);
97+
}
98+
99+
[Test]
100+
public async Task Verify_that_a_subsequent_call_cancels_the_previously_scheduled_func()
101+
{
102+
var runner = new SingleConcurrentActionRunner();
103+
var firstExecuted = false;
104+
var secondExecuted = false;
105+
106+
runner.DelayRunTaskWithInnerCancellationToken(
107+
_ =>
108+
{
109+
firstExecuted = true;
110+
return Task.CompletedTask;
111+
},
112+
500);
113+
114+
// reschedule before the first delay elapses, which should cancel the first task
115+
runner.DelayRunTaskWithInnerCancellationToken(
116+
_ =>
117+
{
118+
secondExecuted = true;
119+
return Task.CompletedTask;
120+
},
121+
50);
122+
123+
await WaitUntilAsync(() => secondExecuted);
124+
125+
// give the first (cancelled) delay enough time to have fired if it was not cancelled
126+
await Task.Delay(700);
127+
128+
Assert.That(secondExecuted, Is.True, "the most recently scheduled func should be invoked");
129+
Assert.That(firstExecuted, Is.False, "the previously scheduled func should have been cancelled");
130+
}
131+
132+
[Test]
133+
public async Task Verify_that_CancelCurrentTask_prevents_the_func_from_being_executed()
134+
{
135+
var runner = new SingleConcurrentActionRunner();
136+
var executed = false;
137+
138+
runner.DelayRunTaskWithInnerCancellationToken(
139+
_ =>
140+
{
141+
executed = true;
142+
return Task.CompletedTask;
143+
},
144+
300);
145+
146+
runner.CancelCurrentTask();
147+
148+
await Task.Delay(500);
149+
150+
Assert.That(executed, Is.False, "a cancelled task should not invoke the func");
151+
}
152+
153+
[Test]
154+
public void Verify_that_CancelCurrentTask_does_not_throw_when_no_task_is_scheduled()
155+
{
156+
var runner = new SingleConcurrentActionRunner();
157+
158+
Assert.DoesNotThrow(() => runner.CancelCurrentTask());
159+
}
160+
}
161+
}

0 commit comments

Comments
 (0)