Skip to content

Commit

Permalink
Minor
Browse files Browse the repository at this point in the history
  • Loading branch information
rampaa committed Dec 22, 2024
1 parent 67b51b2 commit 4e15156
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
6 changes: 3 additions & 3 deletions JL.Windows/GUI/ManageAudioSourcesWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,8 @@ private void UpdateAudioSourcesDisplay()
{
List<DockPanel> resultDockPanels = [];

foreach ((string uri, AudioSource audioSource) in AudioUtils.AudioSources.OrderBy(static a => a.Value.Priority))
IOrderedEnumerable<KeyValuePair<string, AudioSource>> sortedAudioSources = AudioUtils.AudioSources.OrderBy(static a => a.Value.Priority);
foreach ((string uri, AudioSource audioSource) in sortedAudioSources)
{
DockPanel dockPanel = new();

Expand Down Expand Up @@ -167,8 +168,7 @@ private void UpdateAudioSourcesDisplay()
resultDockPanels.Add(dockPanel);
}

AudioSourceListBox.ItemsSource = resultDockPanels
.OrderBy(static dockPanel => ((AudioSource)((CheckBox)dockPanel.Children[0]).Tag).Priority);
AudioSourceListBox.ItemsSource = resultDockPanels;
}

private static void CheckBox_Checked(object sender, RoutedEventArgs e)
Expand Down
6 changes: 3 additions & 3 deletions JL.Windows/GUI/ManageDictionariesWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,8 @@ private void UpdateDictionariesDisplay()
{
List<DockPanel> resultDockPanels = [];

foreach (Dict dict in DictUtils.Dicts.Values)
IOrderedEnumerable<Dict> sortedDicts = DictUtils.Dicts.Values.OrderBy(static d => d.Priority);
foreach (Dict dict in sortedDicts)
{
DockPanel dockPanel = new();

Expand Down Expand Up @@ -252,8 +253,7 @@ and not DictType.Kanjidic
resultDockPanels.Add(dockPanel);
}

DictionariesDisplay.ItemsSource = resultDockPanels
.OrderBy(static dockPanel => ((Dict)((CheckBox)dockPanel.Children[0]).Tag).Priority);
DictionariesDisplay.ItemsSource = resultDockPanels;
}

private void PathTextBox_PreviewMouseLeftButtonUp(object sender, MouseButtonEventArgs e)
Expand Down
6 changes: 3 additions & 3 deletions JL.Windows/GUI/ManageFrequenciesWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,8 @@ private void UpdateFreqsDisplay()
{
List<DockPanel> resultDockPanels = [];

foreach (Freq freq in FreqUtils.FreqDicts.Values)
IOrderedEnumerable<Freq> sortedFreqs = FreqUtils.FreqDicts.Values.OrderBy(static freq => freq.Priority);
foreach (Freq freq in sortedFreqs)
{
DockPanel dockPanel = new();

Expand Down Expand Up @@ -190,8 +191,7 @@ private void UpdateFreqsDisplay()
resultDockPanels.Add(dockPanel);
}

FrequenciesDisplay.ItemsSource = resultDockPanels
.OrderBy(static dockPanel => ((Freq)((CheckBox)dockPanel.Children[0]).Tag).Priority);
FrequenciesDisplay.ItemsSource = resultDockPanels;
}

private void PathTextBlock_PreviewMouseLeftButtonUp(object sender, MouseButtonEventArgs e)
Expand Down

0 comments on commit 4e15156

Please sign in to comment.