Skip to content

Commit

Permalink
Displays Inspection Config info; not very user friendly yet
Browse files Browse the repository at this point in the history
  • Loading branch information
rubberduck203 committed Dec 21, 2014
1 parent cf51b5a commit 6144c9b
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 39 deletions.
29 changes: 0 additions & 29 deletions RetailCoder.VBE/UI/Settings/CodeInspectionControl.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

18 changes: 18 additions & 0 deletions RetailCoder.VBE/UI/Settings/CodeInspectionControl.cs
Expand Up @@ -7,14 +7,32 @@
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using Rubberduck.Config;

namespace Rubberduck.UI.Settings
{
public partial class CodeInspectionControl : UserControl
{
private Configuration _config;
private BindingList<CodeInspection> _inspections;

/// <summary> Parameterless Constructor is to enable design view only. DO NOT USE. </summary>
public CodeInspectionControl()
{
InitializeComponent();
}

public CodeInspectionControl(Configuration config)
: this()
{
_config = config;
_inspections = new BindingList<CodeInspection>(_config.UserSettings.CodeInspectinSettings.CodeInspections.ToList());
//this.dataGridView1.AutoGenerateColumns = true;
this.dataGridView1.DataSource = _inspections;

//todo: change severity to combo box


}
}
}
9 changes: 0 additions & 9 deletions RetailCoder.VBE/UI/Settings/CodeInspectionControl.resx
Expand Up @@ -117,13 +117,4 @@
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<metadata name="InspectionName.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="InspectionType.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="InspectionSeverity.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
</root>
3 changes: 2 additions & 1 deletion RetailCoder.VBE/UI/Settings/SettingsDialog.cs
Expand Up @@ -69,7 +69,8 @@ private void _treeview_NodeSelected(object sender, TreeViewEventArgs e)
if (_inspections == null)
{
//todo: get inspection config from file
_inspections = new CodeInspectionControl();
//note: might want to just pass an enumerable instead
_inspections = new CodeInspectionControl(_config);
}

this.splitContainer1.Panel2.Controls.Clear();
Expand Down

0 comments on commit 6144c9b

Please sign in to comment.