-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #24 from AngelsSoftwareOrg/develop
v1.0.0.9 - Cycle Release - LottoDataManagerSetup_v1.0.0.9 - Add progress bar on Pick Generator, for the selected pick generators type - Remove the native ctrl+c function of object list view for Bets only. - Clear out the highlight renderer on Pick Generator form pick list when generating or clearing the current list.
- Loading branch information
Showing
16 changed files
with
325 additions
and
109 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
47 changes: 47 additions & 0 deletions
47
Includes/Classes/Generator/PickGenerationProgress/AbstractPickGenerationProgress.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
|
||
namespace LottoDataManager.Includes.Classes.Generator.PickGenerationProgress | ||
{ | ||
public abstract class AbstractPickGenerationProgress | ||
{ | ||
public event EventHandler<PickGenerationProgressEvent> PickGenerationProgress; | ||
private PickGenerationProgressEvent pickGenerationProgressEvent; | ||
private Boolean isPickGenerationRunning; | ||
protected AbstractPickGenerationProgress() | ||
{ | ||
pickGenerationProgressEvent = new PickGenerationProgressEvent(); | ||
IsPickGenerationRunning = false; | ||
} | ||
protected PickGenerationProgressEvent PickGenerationProgressEvent { get => pickGenerationProgressEvent; } | ||
public bool IsPickGenerationRunning { get => isPickGenerationRunning; set => isPickGenerationRunning = value; } | ||
protected void RaisePickGenerationProgress() | ||
{ | ||
if (PickGenerationProgress == null) return; | ||
PickGenerationProgress.Invoke(this, PickGenerationProgressEvent); | ||
} | ||
protected bool IsContinuePickGenerationProgress() | ||
{ | ||
RaisePickGenerationProgress(); | ||
if (!IsPickGenerationRunning) return false; | ||
if (PickGenerationProgressEvent.IsGenerationAttemptCountReachMaxValue()) return false; | ||
return true; | ||
} | ||
public void ResetPickGenerationStats() | ||
{ | ||
PickGenerationProgressEvent.ResetCounters(); | ||
} | ||
protected void StartPickGeneration() | ||
{ | ||
IsPickGenerationRunning = true; | ||
ResetPickGenerationStats(); | ||
} | ||
public void StopPickGeneration() | ||
{ | ||
IsPickGenerationRunning = false; | ||
} | ||
} | ||
} |
41 changes: 41 additions & 0 deletions
41
Includes/Classes/Generator/PickGenerationProgress/PickGenerationProgressEvent.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
|
||
namespace LottoDataManager.Includes.Classes.Generator.PickGenerationProgress | ||
{ | ||
public class PickGenerationProgressEvent : EventArgs | ||
{ | ||
private int generatedPickCount; | ||
private long generationAttemptCount; | ||
private long maxAttempt; | ||
|
||
public PickGenerationProgressEvent() | ||
{ | ||
maxAttempt = long.MaxValue - 100; | ||
ResetCounters(); | ||
} | ||
public int GeneratedPickCount { get => generatedPickCount; set => generatedPickCount = value; } | ||
public long GenerationAttemptCount { get => generationAttemptCount; set => generationAttemptCount = value; } | ||
|
||
public void ResetCounters() | ||
{ | ||
GeneratedPickCount = 0; | ||
GenerationAttemptCount = 0; | ||
} | ||
public void IncrementGeneratedPickCount() | ||
{ | ||
GeneratedPickCount++; | ||
} | ||
public void IncrementGenerationAttemptCount() | ||
{ | ||
GenerationAttemptCount++; | ||
} | ||
public bool IsGenerationAttemptCountReachMaxValue() | ||
{ | ||
return (GenerationAttemptCount > maxAttempt); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.