private static void ShowSettings(object o) { wndSettings settings = new wndSettings(); if (settings.ShowDialog() == true) { MainWindow mainWindow = (MainWindow)System.Windows.Application.Current.MainWindow; string defaultSort = Settings.Default.defaultSort; if (defaultSort != null) { if (!(defaultSort == "Alphabetical")) { if (!(defaultSort == "Serial")) { if (!(defaultSort == "Default")) { return; } return; } } else { mainWindow.ApplySort("Title", ListSortDirection.Ascending); return; } mainWindow.ApplySort("Serial", ListSortDirection.Ascending); } } }
private static void ShowSettings(object o) { wndSettings settings = new wndSettings(); if (settings.ShowDialog() == true) { MainWindow mainWindow = (MainWindow) System.Windows.Application.Current.MainWindow; string defaultSort = Settings.Default.defaultSort; if (defaultSort != null) { if (!(defaultSort == "Alphabetical")) { if (!(defaultSort == "Serial")) { if (!(defaultSort == "Default")) { return; } return; } } else { mainWindow.ApplySort("Title", ListSortDirection.Ascending); return; } mainWindow.ApplySort("Serial", ListSortDirection.Ascending); } } }