Skip to content

Commit

Permalink
Minor
Browse files Browse the repository at this point in the history
  • Loading branch information
rampaa committed Feb 10, 2024
1 parent 51cc4f6 commit a86ea5d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
5 changes: 3 additions & 2 deletions JL.Windows/GUI/EditDictionaryWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
5 changes: 3 additions & 2 deletions JL.Windows/GUI/EditFrequencyWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit a86ea5d

Please sign in to comment.