Skip to content

Commit 8662ae7

Browse files
committed
fixed UI issue with 1 task and no configured steps
1 parent 45909e1 commit 8662ae7

5 files changed

Lines changed: 18 additions & 6 deletions

File tree

CompuMaster.TaskManagement.UI.WinForms/CompuMaster.TaskManagement.UI.WinForms.vbproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<Version>2024.11.12.102</Version>
5-
<Copyright>2023-2024 CompuMaster GmbH</Copyright>
4+
<Version>2026.01.26.0</Version>
5+
<Copyright>2023-2026 CompuMaster GmbH</Copyright>
66
<Title>CompuMaster.TaskManagement.UI.WinForms - MIT license edition</Title>
77
<Company>CompuMaster GmbH</Company>
88
<Authors>Jochen Wezel</Authors>

CompuMaster.TaskManagement.UIDemoApp/DummyTaskBundles.vb

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,16 @@
22

33
Public NotInheritable Class DummyTaskBundles
44

5+
''' <summary>
6+
''' Dummy Task Bundle with exception in first steps and rollback
7+
''' </summary>
8+
''' <returns></returns>
9+
Public Shared Function DummyTaskBundleWith1TaskButWithoutAnySteps() As ProgressingTaskBundle
10+
Dim Result As New ProgressingTaskBundle("Dummy Task Bundle with 1 task and no steps")
11+
Dim Task1 As ProgressingTaskItem = Result.CreateAndAddNewTask("Dummy Task 1")
12+
Return Result
13+
End Function
14+
515
''' <summary>
616
''' Dummy Task Bundle with exception in first steps and rollback
717
''' </summary>

CompuMaster.TaskManagement.UIDemoApp/MainForm.vb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,8 @@ Public Class MainForm
4444
Dim f As MultiTaskProgessForm
4545

4646
'Run tasks which doesn't use result data
47+
f = New MultiTaskProgessForm(DummyTaskBundles.DummyTaskBundleWith1TaskButWithoutAnySteps)
48+
f.Show()
4749
f = New MultiTaskProgessForm(DummyTaskBundles.DummyTaskBundleFailingWithRollback)
4850
f.Show()
4951
f = New MultiTaskProgessForm(DummyTaskBundles.DummyTaskBundleFailingWithRollbackFailingWithThrownException)

CompuMaster.TaskManagement/CompuMaster.TaskManagement.vbproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22
<PropertyGroup>
3-
<Version>2024.11.12.102</Version>
4-
<Copyright>2023-2024 CompuMaster GmbH</Copyright>
3+
<Version>2026.01.26.0</Version>
4+
<Copyright>2023-2026 CompuMaster GmbH</Copyright>
55
<RootNamespace>CompuMaster.TaskManagement</RootNamespace>
66
<TargetFrameworks>netstandard2.0;net6.0;net48</TargetFrameworks>
77
<Title>CompuMaster.TaskManagement - MIT license edition</Title>

CompuMaster.TaskManagement/ProgressingTaskItem.vb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ Public Class ProgressingTaskItem
202202
''' <returns></returns>
203203
Public ReadOnly Property RunningStep As ProgressingTaskStepBase
204204
Get
205-
If RunningTotalStepIndex.HasValue Then
205+
If RunningTotalStepIndex.HasValue AndAlso RunningTotalStepIndex >= 0 Then
206206
Return TotalStepItem(RunningTotalStepIndex.Value)
207207
Else
208208
Return Nothing
@@ -405,7 +405,7 @@ Public Class ProgressingTaskItem
405405
''' <returns></returns>
406406
Public ReadOnly Property EstimatedTimeOfArrival() As TimeSpan?
407407
Get
408-
If Me.RunningTotalStepIndex.HasValue = False Then
408+
If Me.RunningTotalStepIndex.HasValue = False OrElse Me.RunningTotalStepIndex < 0 OrElse Me.TotalStepsCount = 0 Then
409409
'Task has not started yet -> return estimated time to run
410410
If Me.Status = ProgressingTaskStep.ProgressingTaskStepStatus.NotStarted Then
411411
Return Me.EstimatedTimeToRun

0 commit comments

Comments
 (0)