Skip to content

Commit ef8b89c

Browse files
author
LoneWandererProductions
committed
Clean up Coreviewer a bit more.
Make use of Converter
1 parent 700c185 commit ef8b89c

7 files changed

Lines changed: 11 additions & 62 deletions

File tree

CoreViewer/AnalyzerViewModel.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
22
* COPYRIGHT: See COPYING in the top level directory
33
* PROJECT: CoreViewer
4-
* FILE: CoreViewer/AnalyzerViewModel.cs
4+
* FILE: AnalyzerViewModel.cs
55
* PURPOSE: ViewModel for Analyzer Viewer, handles loading and running analyzers, filtering diagnostics, and folder selection
66
* PROGRAMMER: Peter Geinitz (Wayfarer)
77
*/
@@ -239,7 +239,7 @@ private void ApplyFilter()
239239
DiagnosticsView.Add(new DiagnosticItemViewModel(d,
240240
openFile: _ => HandleOpen(d.Name),
241241
ignore: _ => HandleIgnore(d.Name),
242-
fix: FixableAnalyzers.Contains(d.Name) ? _ => HandleFix(d.Name) : null));
242+
fix: FixableAnalyzers.Contains(d.Name) ? _ => global::CoreViewer.AnalyzerViewModel.HandleFix(d.Name) : null));
243243
}
244244
}
245245

@@ -277,10 +277,10 @@ private void HandleOpen(string name)
277277
/// Handles the fix.
278278
/// </summary>
279279
/// <param name="name">The name.</param>
280-
private void HandleFix(string name)
280+
private static void HandleFix(string name)
281281
{
282282
// Minimal placeholder
283283
System.Windows.MessageBox.Show($"Fix logic for {name} not implemented yet.", "Fix");
284284
}
285285
}
286-
}
286+
}

CoreViewer/App.xaml.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
22
* COPYRIGHT: See COPYING in the top level directory
33
* PROJECT: CoreViewer
4-
* FILE: CoreViewer/BoolToVisibilityConverter.cs
4+
* FILE: BoolToVisibilityConverter.cs
55
* PURPOSE: Entry point and application definition for the WPF application.
66
* PROGRAMMER: Peter Geinitz (Wayfarer)
77
*/

CoreViewer/BoolToVisibilityConverter.cs

Lines changed: 0 additions & 53 deletions
This file was deleted.

CoreViewer/CoreViewer.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
</PropertyGroup>
1010

1111
<ItemGroup>
12+
<ProjectReference Include="..\CommonControls.Converter\CommonControls.Converter.csproj" />
1213
<ProjectReference Include="..\CommonDialogs\CommonDialogs.csproj" />
1314
<ProjectReference Include="..\CoreBuilder\CoreBuilder.csproj" />
1415
</ItemGroup>

CoreViewer/DiagnosticItemViewModel.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
22
* COPYRIGHT: See COPYING in the top level directory
33
* PROJECT: CoreViewer
4-
* FILE: CoreViewer/DiagnosticItemViewModel.cs
4+
* FILE: DiagnosticItemViewModel.cs
55
* PURPOSE: Our ViewModel for a single diagnostic item in the list.
66
* PROGRAMMER: Peter Geinitz (Wayfarer)
77
*/

CoreViewer/MainWindow.xaml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,13 @@
33
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
44
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
55
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
6-
xmlns:local="clr-namespace:CoreViewer"
6+
xmlns:local="clr-namespace:CoreViewer"
7+
xmlns:conv="clr-namespace:CommonControls.Converter;assembly=CommonControls.Converter"
78
mc:Ignorable="d"
89
Title="Analyzer Viewer" Height="450" Width="900">
910

1011
<Window.Resources>
11-
<local:BoolToVisibilityConverter x:Key="BoolToVisibility" />
12+
<conv:BooleanToVisibilityConverter x:Key="BoolToVisibility" />
1213
</Window.Resources>
1314

1415
<Window.DataContext>

CoreViewer/MainWindow.xaml.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
22
* COPYRIGHT: See COPYING in the top level directory
33
* PROJECT: CoreViewer
4-
* FILE: CoreViewer/MainWindow.xaml.cs
4+
* FILE: MainWindow.xaml.cs
55
* PURPOSE: Entry for the WPF application.
66
* PROGRAMMER: Peter Geinitz (Wayfarer)
77
*/

0 commit comments

Comments
 (0)