-
-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
This reverts commit 595ac5b.
- Loading branch information
1 parent
595ac5b
commit 437c09c
Showing
13 changed files
with
115 additions
and
98 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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
using System.ComponentModel.DataAnnotations.Schema; | ||
using Bible2PPT.Bibles; | ||
|
||
namespace Bible2PPT.PPT | ||
{ | ||
class JobBible | ||
{ | ||
[DatabaseGenerated(DatabaseGeneratedOption.Identity)] | ||
public int Id { get; set; } | ||
|
||
public virtual Job Job { get; set; } | ||
|
||
public virtual Bible Bible { get; set; } | ||
} | ||
} |
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,18 @@ | ||
using System; | ||
|
||
namespace Bible2PPT.PPT | ||
{ | ||
class JobCompletedEventArgs : EventArgs | ||
{ | ||
public Job Job { get; } | ||
public Exception Exception { get; } | ||
public bool IsFaulted => Exception != null; | ||
public bool IsCancelled => Exception is OperationCanceledException; | ||
|
||
public JobCompletedEventArgs(Job job, Exception ex) | ||
{ | ||
Job = job; | ||
Exception = ex; | ||
} | ||
} | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
using System; | ||
using Bible2PPT.Bibles; | ||
|
||
namespace Bible2PPT.PPT | ||
{ | ||
class JobProgressEventArgs : EventArgs | ||
{ | ||
public Job Job { get; } | ||
public Chapter CurrentChapter { get; } | ||
|
||
public int QueriesDone { get; } | ||
public int Queries { get; } | ||
public int ChaptersDone { get; } | ||
public int Chapters { get; } | ||
|
||
public double Progress => (Chapters == 0) | ||
? (double)QueriesDone / Queries | ||
: (double)Math.Min(QueriesDone + 1, Queries) / Queries * ChaptersDone / Chapters; | ||
|
||
public JobProgressEventArgs(Job job, Chapter currentChapter, int queriesDone, int queries, int chaptersDone, int chapters) | ||
{ | ||
Job = job; | ||
CurrentChapter = currentChapter; | ||
QueriesDone = queriesDone; | ||
Queries = queries; | ||
ChaptersDone = chaptersDone; | ||
Chapters = chapters; | ||
} | ||
} | ||
} |
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,14 @@ | ||
using System; | ||
|
||
namespace Bible2PPT.PPT | ||
{ | ||
class JobQueuedEventArgs : EventArgs | ||
{ | ||
public Job Job { get; } | ||
|
||
public JobQueuedEventArgs(Job job) | ||
{ | ||
Job = job; | ||
} | ||
} | ||
} |
Oops, something went wrong.