-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Change text rendering mode slightly to be more consistent (may cause some offset to existing panels)
- Loading branch information
1 parent
4ed3f6f
commit 2cf24bf
Showing
11 changed files
with
858 additions
and
50 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
|
||
namespace InfoPanel.Extensions | ||
{ | ||
public static class DictionaryExtensions | ||
{ | ||
public static string GetStringValue(this Dictionary<string, string> dict, string key, string fallback) | ||
{ | ||
return dict.TryGetValue(key, out var value) ? value : fallback; | ||
} | ||
|
||
public static int GetIntValue(this Dictionary<string, string> dict, string key, int fallback) | ||
{ | ||
return dict.TryGetValue(key, out var value) && int.TryParse(value, out var result) ? result : fallback; | ||
} | ||
} | ||
} |
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.