Skip to content

Commit

Permalink
feat: add 3 days invalidating period setting
Browse files Browse the repository at this point in the history
  • Loading branch information
sirAndros committed Oct 7, 2019
1 parent 4e7d6b7 commit 045bac3
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
1 change: 1 addition & 0 deletions src/Settings/OptionsPanel.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 7 additions & 4 deletions src/Settings/OptionsPanel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -293,6 +293,7 @@ public enum SHSTOCKICONID : uint
private const long VALID_6HOURS = VALID_2HOURS * 3;
private const long VALID_12HOURS = VALID_6HOURS * 2;
private const long VALID_1DAY = VALID_12HOURS * 2;
private const long VALID_3DAYS = VALID_1DAY * 3;
private const long VALID_7DAYS = VALID_1DAY * 7;
private const long VALID_MONTH = VALID_1DAY * 30;
private const long VALID_DEFAULT = Settings.VALID_PERIOD_DEFAULT;
Expand All @@ -312,8 +313,9 @@ private static long IndexToPeriod(int index)
case 8: return VALID_6HOURS;
case 9: return VALID_12HOURS;
case 10: return VALID_1DAY;
case 11: return VALID_7DAYS;
case 12: return VALID_MONTH;
case 11: return VALID_3DAYS;
case 12: return VALID_7DAYS;
case 13: return VALID_MONTH;
default: return VALID_DEFAULT;
}
}
Expand All @@ -333,8 +335,9 @@ private static int PeriodToIndex(TimeSpan timeSpan)
case VALID_6HOURS: return 8;
case VALID_12HOURS: return 9;
case VALID_1DAY: return 10;
case VALID_7DAYS: return 11;
case VALID_MONTH: return 12;
case VALID_3DAYS: return 11;
case VALID_7DAYS: return 12;
case VALID_MONTH: return 13;
default: return 10;
}
}
Expand Down

0 comments on commit 045bac3

Please sign in to comment.