Browse Source

Merge pull request #29 from linquize/codequality-project-assembly

Add a button to load current project assembly to CodeQuality
pull/331/head
Daniel Grunwald 12 years ago
parent
commit
7e1caa73db
  1. 1
      src/AddIns/Analysis/CodeQuality/Gui/MainView.xaml
  2. 18
      src/AddIns/Analysis/CodeQuality/Gui/MainView.xaml.cs

1
src/AddIns/Analysis/CodeQuality/Gui/MainView.xaml

@ -9,6 +9,7 @@ @@ -9,6 +9,7 @@
<DockPanel>
<ToolBar DockPanel.Dock="Top">
<Button Click="AddAssemblyClick">Add Assembly</Button>
<Button Click="AddCurrentProjectAssemblyClick">Add Current Project Assembly</Button>
<Menu Background="White" x:Name="printMenu" Visibility="Hidden">
<MenuItem Header="Reports">

18
src/AddIns/Analysis/CodeQuality/Gui/MainView.xaml.cs

@ -32,6 +32,7 @@ using ICSharpCode.CodeQuality.Engine.Dom; @@ -32,6 +32,7 @@ using ICSharpCode.CodeQuality.Engine.Dom;
using ICSharpCode.CodeQuality.Reporting;
using ICSharpCode.Reports.Core.WpfReportViewer;
using ICSharpCode.SharpDevelop.Gui;
using ICSharpCode.SharpDevelop.Project;
using Microsoft.Win32;
namespace ICSharpCode.CodeQuality.Gui
@ -70,6 +71,23 @@ namespace ICSharpCode.CodeQuality.Gui @@ -70,6 +71,23 @@ namespace ICSharpCode.CodeQuality.Gui
UpdateUI();
}
void AddCurrentProjectAssemblyClick(object sender, RoutedEventArgs e)
{
if (ProjectService.CurrentProject == null)
return;
string fileName = ProjectService.CurrentProject.OutputAssemblyFullPath;
if (string.IsNullOrEmpty(fileName))
{
MessageBox.Show("Project output assembly not found! Please build it first!");
return;
}
introBlock.Visibility = Visibility.Collapsed;
this.fileNames.Add(fileName);
Analyse(new string[] { fileName });
UpdateUI();
}
void Analyse (string[] fileNames)
{

Loading…
Cancel
Save