Skip to content

Commit

Permalink
Moved the logger declaration and removed redundant parentheses
Browse files Browse the repository at this point in the history
  • Loading branch information
Lisa Glover committed Jun 12, 2024
1 parent 778a605 commit 287594e
Showing 1 changed file with 10 additions and 11 deletions.
21 changes: 10 additions & 11 deletions Vts.Gui.Wpf/MainWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,11 @@ namespace Vts.Gui.Wpf
public partial class MainWindow
{
private int _numViews;
private readonly ILogger _logger;

public MainWindow()
{
_logger = LoggerFactoryLocator.GetDefaultNLogFactory().Create(typeof(MainWindow));
_logger.Info("Starting application");
var logger = LoggerFactoryLocator.GetDefaultNLogFactory().Create(typeof(MainWindow));
logger.Info("Starting application");
var observableTarget =
NLog.LogManager.Configuration.AllTargets.FirstOrDefault(target => target is ObservableTarget);
((IObservable<string>)observableTarget)?.Subscribe(
Expand All @@ -45,22 +44,22 @@ private void InputTabControl_SelectionChanged(object sender, SelectionChangedEve
// "TabInverse":
default:
OutputTabControl.SelectedItem = OutputTabControl.Items[0];
(((TabItem)OutputTabControl.Items[0])!).Visibility = Visibility.Visible;
(((TabItem)OutputTabControl.Items[1])!).Visibility = Visibility.Collapsed;
((TabItem)OutputTabControl.Items[0])!.Visibility = Visibility.Visible;
((TabItem)OutputTabControl.Items[1])!.Visibility = Visibility.Collapsed;
break;
case "TabFluence":
OutputTabControl.SelectedItem = OutputTabControl.Items[1];
(((TabItem)OutputTabControl.Items[1])!).Visibility = Visibility.Visible;
(((TabItem)OutputTabControl.Items[0])!).Visibility = Visibility.Collapsed;
((TabItem)OutputTabControl.Items[1])!.Visibility = Visibility.Visible;
((TabItem)OutputTabControl.Items[0])!.Visibility = Visibility.Collapsed;
break;
case "TabMonteCarlo":
(((TabItem)OutputTabControl.Items[1])!).Visibility = Visibility.Visible;
(((TabItem)OutputTabControl.Items[0])!).Visibility = Visibility.Visible;
((TabItem)OutputTabControl.Items[1])!.Visibility = Visibility.Visible;
((TabItem)OutputTabControl.Items[0])!.Visibility = Visibility.Visible;
break;
case "TabSpectral":
OutputTabControl.SelectedItem = OutputTabControl.Items[0];
(((TabItem)OutputTabControl.Items[0])!).Visibility = Visibility.Visible;
(((TabItem)OutputTabControl.Items[1])!).Visibility = Visibility.Collapsed;
((TabItem)OutputTabControl.Items[0])!.Visibility = Visibility.Visible;
((TabItem)OutputTabControl.Items[1])!.Visibility = Visibility.Collapsed;
WindowViewModel.Current.PlotVM?.SetCustomPlotLabel.Execute(WindowViewModel.Current.SpectralMappingVM.SelectedTissue.Name);
break;
}
Expand Down

0 comments on commit 287594e

Please sign in to comment.