Skip to content

Commit 92874f0

Browse files
committed
1 parent 8503ad5 commit 92874f0

19 files changed

+516
-96
lines changed

RetailCoder.VBE/Properties/Resources.Designer.cs

Lines changed: 10 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

RetailCoder.VBE/Properties/Resources.resx

Lines changed: 56 additions & 53 deletions
Large diffs are not rendered by default.
28 KB
Loading

RetailCoder.VBE/Rubberduck.csproj

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -301,6 +301,12 @@
301301
<DesignTime>True</DesignTime>
302302
<DependentUpon>RubberduckUI.resx</DependentUpon>
303303
</Compile>
304+
<Compile Include="UI\Settings\GeneralSettingsControl.cs">
305+
<SubType>UserControl</SubType>
306+
</Compile>
307+
<Compile Include="UI\Settings\GeneralSettingsControl.Designer.cs">
308+
<DependentUpon>GeneralSettingsControl.cs</DependentUpon>
309+
</Compile>
304310
<Compile Include="UI\SourceControl\SourceControlPanel.cs">
305311
<SubType>UserControl</SubType>
306312
</Compile>
@@ -589,6 +595,9 @@
589595
<EmbeddedResource Include="UI\Settings\ConfigurationTreeView.resx">
590596
<DependentUpon>ConfigurationTreeView.cs</DependentUpon>
591597
</EmbeddedResource>
598+
<EmbeddedResource Include="UI\Settings\GeneralSettingsControl.resx">
599+
<DependentUpon>GeneralSettingsControl.cs</DependentUpon>
600+
</EmbeddedResource>
592601
<EmbeddedResource Include="UI\Settings\SettingsDialog.resx">
593602
<DependentUpon>SettingsDialog.cs</DependentUpon>
594603
</EmbeddedResource>
@@ -647,6 +656,7 @@
647656
<None Include="Resources\plus-circle.png" />
648657
</ItemGroup>
649658
<ItemGroup>
659+
<None Include="Resources\Rubberduck.png" />
650660
<Content Include="Resources\Rubberduck\RD-AboutWindow.png" />
651661
<Content Include="Resources\Rubberduck\RD-InstallBanner.bmp" />
652662
<Content Include="Resources\Rubberduck\RD-InstallWindow.bmp" />

RetailCoder.VBE/UI/CodeExplorer/CodeExplorerDockablePresenter.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -304,7 +304,7 @@ private async Task<IEnumerable<TreeNode>> CreateModuleNodesAsync(VBProject proje
304304
var node = new TreeNode(component.Name);
305305
node.ImageKey = ComponentTypeIcons[component.Type];
306306
node.SelectedImageKey = node.ImageKey;
307-
node.Tag = parseResult.Declarations.Items.SingleOrDefault(item => item.IdentifierName == component.Name && item.Project == project);
307+
node.Tag = parseResult.Declarations.Items.FirstOrDefault(item => item.IdentifierName == component.Name && item.Project == project);
308308

309309
foreach (var declaration in members)
310310
{

RetailCoder.VBE/UI/RubberduckUI.Designer.cs

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

RetailCoder.VBE/UI/RubberduckUI.resx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@
205205
<value>ToDo Settings</value>
206206
</data>
207207
<data name="SettingsInstructions_CodeInspections" xml:space="preserve">
208-
<value>Configure inspection severity. Use "do no show" to disable an inspection.</value>
208+
<value>Configure inspection severity. Use "DoNotShow" to disable an inspection.</value>
209209
</data>
210210
<data name="SettingsInstructions_GeneralSettings" xml:space="preserve">
211211
<value>Changes will be applied after Rubberduck is reloaded.</value>

RetailCoder.VBE/UI/Settings/CodeInspectionControl.Designer.cs

Lines changed: 22 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

RetailCoder.VBE/UI/Settings/CodeInspectionControl.cs

Lines changed: 20 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,33 +6,41 @@
66
using System.Windows.Forms;
77
using Rubberduck.Config;
88
using Rubberduck.Inspections;
9+
using Rubberduck.UI.CodeInspections;
910

1011
namespace Rubberduck.UI.Settings
1112
{
12-
public partial class CodeInspectionControl : UserControl
13+
public partial class CodeInspectionSettingsControl : UserControl
1314
{
1415
/// <summary> Parameterless Constructor is to enable design view only. DO NOT USE. </summary>
15-
public CodeInspectionControl()
16+
public CodeInspectionSettingsControl()
1617
{
1718
InitializeComponent();
1819
}
1920

20-
public CodeInspectionControl(IEnumerable<CodeInspectionSetting> inspections)
21+
public CodeInspectionSettingsControl(IEnumerable<CodeInspectionSetting> inspections)
2122
: this()
2223
{
2324
var allInspections = new BindingList<CodeInspectionSetting>(inspections
2425
.OrderBy(c => c.InspectionType.ToString())
2526
.ThenBy(c => c.Name)
2627
.ToList()
2728
);
29+
30+
codeInspectionsGrid.AutoGenerateColumns = false;
2831

29-
codeInspectionsGrid.AlternatingRowsDefaultCellStyle.BackColor = Color.Lavender;
32+
codeInspectionsGrid.BorderStyle = BorderStyle.None;
3033
codeInspectionsGrid.SelectionMode = DataGridViewSelectionMode.FullRowSelect;
34+
codeInspectionsGrid.CellBorderStyle = DataGridViewCellBorderStyle.None;
35+
codeInspectionsGrid.GridColor = Color.LightGray;
3136

32-
codeInspectionsGrid.AutoGenerateColumns = false;
33-
codeInspectionsGrid.DataSource = allInspections;
37+
codeInspectionsGrid.RowsDefaultCellStyle.BackColor = Color.White;
38+
codeInspectionsGrid.RowsDefaultCellStyle.SelectionBackColor = Color.LightBlue;
39+
codeInspectionsGrid.RowsDefaultCellStyle.SelectionForeColor = Color.MediumBlue;
3440

35-
codeInspectionsGrid.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.Fill;
41+
codeInspectionsGrid.AlternatingRowsDefaultCellStyle.BackColor = Color.Honeydew;
42+
codeInspectionsGrid.AlternatingRowsDefaultCellStyle.SelectionBackColor = Color.LightBlue;
43+
codeInspectionsGrid.AlternatingRowsDefaultCellStyle.SelectionForeColor = Color.MediumBlue;
3644

3745
var nameColumn = new DataGridViewTextBoxColumn();
3846
nameColumn.Name = "InspectionName";
@@ -52,10 +60,14 @@ public CodeInspectionControl(IEnumerable<CodeInspectionSetting> inspections)
5260
var severityColumn = new DataGridViewComboBoxColumn();
5361
severityColumn.Name = "InspectionSeverity";
5462
severityColumn.DataPropertyName = "Severity";
55-
severityColumn.HeaderText = "Severity";
5663
severityColumn.DataSource = Enum.GetValues(typeof(CodeInspectionSeverity));
64+
severityColumn.HeaderText = "Severity";
65+
severityColumn.DefaultCellStyle.Font = codeInspectionsGrid.Font;
5766
codeInspectionsGrid.Columns.Add(severityColumn);
5867

68+
// temporal coupling here: this code should run after columns are formatted.
69+
codeInspectionsGrid.DataSource = allInspections;
70+
codeInspectionsGrid.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.Fill;
5971
}
6072
}
6173
}

RetailCoder.VBE/UI/Settings/ConfigurationTreeView.Designer.cs

Lines changed: 18 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)