Use DevMode option instead of debug check

This commit is contained in:
Jaex 2021-08-23 02:09:34 +03:00
parent 24635bdfd8
commit 318ebc8d69
2 changed files with 3 additions and 8 deletions

View file

@ -258,8 +258,7 @@ private void UpdateTitle(HistoryItem[] historyItems = null)
string[] typeNames = Enum.GetNames(typeof(EDataType));
string[] typeTranslations = Helpers.GetLocalizedEnumDescriptions<EDataType>();
Dictionary<string, string> lookup = Enumerable.Zip(typeNames, typeTranslations, (key, val) => new { key, val } )
.ToDictionary(e => e.key, e => e.val);
Dictionary<string, string> lookup = Enumerable.Zip(typeNames, typeTranslations, (key, val) => new { key, val }).ToDictionary(e => e.key, e => e.val);
IEnumerable<string> types = historyItems.
GroupBy(x => x.Type).
@ -403,12 +402,10 @@ private void HistoryForm_KeyDown(object sender, KeyEventArgs e)
RefreshHistoryItems();
e.Handled = true;
break;
#if DEBUG
case Keys.Control | Keys.F5:
case Keys.Control | Keys.F5 when HelpersOptions.DevMode:
RefreshHistoryItems(true);
e.Handled = true;
break;
#endif
}
}

View file

@ -194,12 +194,10 @@ private void ImageHistoryForm_KeyDown(object sender, KeyEventArgs e)
RefreshHistoryItems();
e.Handled = true;
break;
#if DEBUG
case Keys.Control | Keys.F5:
case Keys.Control | Keys.F5 when HelpersOptions.DevMode:
RefreshHistoryItems(true);
e.Handled = true;
break;
#endif
}
}