From a86ea5d36783d42a99d3833bee2efaf8ad977a25 Mon Sep 17 00:00:00 2001 From: rampaa Date: Sat, 10 Feb 2024 19:47:34 +0300 Subject: [PATCH] Minor --- JL.Windows/GUI/EditDictionaryWindow.xaml.cs | 5 +++-- JL.Windows/GUI/EditFrequencyWindow.xaml.cs | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/JL.Windows/GUI/EditDictionaryWindow.xaml.cs b/JL.Windows/GUI/EditDictionaryWindow.xaml.cs index 560971e1..5166b31c 100644 --- a/JL.Windows/GUI/EditDictionaryWindow.xaml.cs +++ b/JL.Windows/GUI/EditDictionaryWindow.xaml.cs @@ -42,8 +42,9 @@ private void SaveButton_Click(object sender, RoutedEventArgs e) string fullPath = Path.GetFullPath(path, Utils.ApplicationPath); if (string.IsNullOrWhiteSpace(path) - || (!Directory.Exists(fullPath) && !File.Exists(fullPath)) - || (_dict.Path != path && DictUtils.Dicts.Values.Any(dict => dict.Path == path))) + || (_dict.Path != path + && ((!Directory.Exists(fullPath) && !File.Exists(fullPath)) + || DictUtils.Dicts.Values.Any(dict => dict.Path == path)))) { TextBlockPath.BorderBrush = Brushes.Red; isValid = false; diff --git a/JL.Windows/GUI/EditFrequencyWindow.xaml.cs b/JL.Windows/GUI/EditFrequencyWindow.xaml.cs index d90f3f97..ecffac2b 100644 --- a/JL.Windows/GUI/EditFrequencyWindow.xaml.cs +++ b/JL.Windows/GUI/EditFrequencyWindow.xaml.cs @@ -39,8 +39,9 @@ private void SaveButton_Click(object sender, RoutedEventArgs e) string fullPath = Path.GetFullPath(path, Utils.ApplicationPath); if (string.IsNullOrWhiteSpace(path) - || (!Directory.Exists(fullPath) && !File.Exists(fullPath)) - || (_freq.Path != path && FreqUtils.FreqDicts.Values.Any(dict => dict.Path == path))) + || (_freq.Path != path + && ((!Directory.Exists(fullPath) && !File.Exists(fullPath)) + || FreqUtils.FreqDicts.Values.Any(dict => dict.Path == path)))) { TextBlockPath.BorderBrush = Brushes.Red; isValid = false;