-
Notifications
You must be signed in to change notification settings - Fork 43
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
13 changed files
with
303 additions
and
301 deletions.
There are no files selected for viewing
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
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
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,35 @@ | ||
using System.Windows.Shell; | ||
using BuildVision.Contracts; | ||
|
||
namespace BuildVision.Extensions | ||
{ | ||
public static class BuildStateExtensions | ||
{ | ||
public static TaskbarItemProgressState ToTaskBarItemProgressState(this BuildState buildState, BuildScopes buildScope) | ||
{ | ||
var progressState = TaskbarItemProgressState.Normal; | ||
if (buildState == BuildState.Cancelled) | ||
{ | ||
progressState = TaskbarItemProgressState.Paused; | ||
} | ||
else if (buildState == BuildState.Failed) | ||
{ | ||
progressState = TaskbarItemProgressState.Error; | ||
} | ||
else if (buildState != BuildState.InProgress) | ||
{ | ||
progressState = TaskbarItemProgressState.None; | ||
} | ||
else if (buildScope != BuildScopes.BuildScopeSolution) | ||
{ | ||
progressState = TaskbarItemProgressState.Indeterminate; | ||
} | ||
else | ||
{ | ||
progressState = TaskbarItemProgressState.Normal; | ||
} | ||
|
||
return progressState; | ||
} | ||
} | ||
} |
Oops, something went wrong.