public static void Open([NotNull] CarObject car) { if (!(Application.Current?.MainWindow is MainWindow main) || Keyboard.Modifiers == ModifierKeys.Control && !User32.IsAsyncKeyPressed(System.Windows.Forms.Keys.K) || SettingsHolder.Interface.SkinsSetupsNewWindow) { CarSkinsDialog.Show(car); }
public static void Open(CarObject car) { var main = Application.Current?.MainWindow as MainWindow; if (main == null || SettingsHolder.Interface.SkinsSetupsNewWindow) { CarSkinsDialog.Show(car); } else { main.OpenSubGroup("skins", $"Skins for {car.DisplayName}", UriExtension.Create("/Pages/Lists/CarSkinsListPage.xaml?CarId={0}", car.Id)); } }