private void CreateDisplayer() { if (directory is null) { return; } displayer?.Hide(); if (displayer is Displayer internalDisplayer) { internalDisplayer.ClearDisplayArea(); } if (UseExternalView.IsChecked.Value) { DirectoryPicker dirPicker = null; if (PhotoRadioButton.IsChecked.Value) { dirPicker = new PhotoDirectoryPicker(directory); } else if (VideoRadioButton.IsChecked.Value) { dirPicker = new MovieDirectoryPicker(directory); } displayer = new ExternalDisplayer(dirPicker); } else { if (PhotoRadioButton.IsChecked.Value) { displayer = new PhotoDisplayer(DisplayArea, directory); } else if (VideoRadioButton.IsChecked.Value) { displayer = new MovieDisplayer(DisplayArea, directory); } } foreach (var action in autoActions) { _ = action.Register(displayer); } if (displayer is RandomMediaPlayer.HistoryTracking.IHistoryTracking historyDisplayer) { TrackHistory.Visibility = Visibility.Visible; SeenTotalMedia.Visibility = Visibility.Visible; TrackHistory.IsChecked = historyDisplayer.HistoryTracker.IsTracking; } else { TrackHistory.Visibility = Visibility.Collapsed; SeenTotalMedia.Visibility = Visibility.Collapsed; } ApplyMinHeight(); SetDisplayedTest(); }