Skip to content

Commit cdad2a0

Browse files
committed
Merge pull request #24 from rubberduck-vba/next
sync with merged PR's in main repo
2 parents ffc5206 + fa6eedf commit cdad2a0

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

58 files changed

+1544
-588
lines changed

RetailCoder.VBE/Common/WinAPI/POINT.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ public struct POINT
1010

1111
public POINT(int x, int y)
1212
{
13-
this.X = x;
14-
this.Y = y;
13+
X = x;
14+
Y = y;
1515
}
1616

1717
public POINT(System.Drawing.Point pt) : this(pt.X, pt.Y) { }
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
<DataGrid x:Class="Rubberduck.Controls.GroupingGrid"
2+
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
3+
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
4+
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
5+
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
6+
xmlns:local="clr-namespace:Rubberduck.Controls"
7+
mc:Ignorable="d"
8+
d:DesignHeight="300" d:DesignWidth="300">
9+
<DataGrid.Resources>
10+
<Style x:Key="GroupHeaderStyle" TargetType="{x:Type GroupItem}">
11+
<Setter Property="Template">
12+
<Setter.Value>
13+
<ControlTemplate>
14+
<Expander Background="WhiteSmoke" Foreground="Black" Header="{Binding Name}" IsExpanded="True">
15+
<ItemsPresenter></ItemsPresenter>
16+
</Expander>
17+
</ControlTemplate>
18+
</Setter.Value>
19+
</Setter>
20+
</Style>
21+
</DataGrid.Resources>
22+
<DataGrid.GroupStyle>
23+
<GroupStyle ContainerStyle="{StaticResource GroupHeaderStyle}">
24+
<GroupStyle.Panel>
25+
<ItemsPanelTemplate>
26+
<DataGridRowsPresenter></DataGridRowsPresenter>
27+
</ItemsPanelTemplate>
28+
</GroupStyle.Panel>
29+
</GroupStyle>
30+
</DataGrid.GroupStyle>
31+
</DataGrid>
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
using System;
2+
using System.Collections.Generic;
3+
using System.Linq;
4+
using System.Text;
5+
using System.Threading.Tasks;
6+
using System.Windows;
7+
using System.Windows.Controls;
8+
using System.Windows.Data;
9+
using System.Windows.Documents;
10+
using System.Windows.Input;
11+
using System.Windows.Media;
12+
using System.Windows.Media.Imaging;
13+
using System.Windows.Navigation;
14+
using System.Windows.Shapes;
15+
16+
namespace Rubberduck.Controls
17+
{
18+
public partial class GroupingGrid
19+
{
20+
public static readonly DependencyProperty IsExpandedProperty =
21+
DependencyProperty.Register("IsExpanded", typeof(bool), typeof(GroupingGrid));
22+
23+
public bool IsExpanded
24+
{
25+
get { return (bool)GetValue(IsExpandedProperty); }
26+
set { SetValue(IsExpandedProperty, value); }
27+
}
28+
29+
public GroupingGrid()
30+
{
31+
InitializeComponent();
32+
}
33+
}
34+
}

RetailCoder.VBE/Root/RubberduckModule.cs

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@
1919
using Rubberduck.UI.CodeExplorer;
2020
using Rubberduck.UI.CodeInspections;
2121
using Rubberduck.UI.Command;
22+
using Rubberduck.UI.Command.MenuItems;
23+
using Rubberduck.UI.ToDoItems;
2224
using Rubberduck.UI.UnitTesting;
2325
using Rubberduck.VBEditor.VBEHost;
2426

@@ -74,12 +76,17 @@ public override void Load()
7476
.WhenInjectedInto<RunCodeInspectionsCommand>()
7577
.InSingletonScope()
7678
.WithConstructorArgument<IDockableUserControl>(new CodeInspectionsWindow { ViewModel = _kernel.Get<InspectionResultsViewModel>() });
77-
79+
7880
Bind<IPresenter>().To<CodeExplorerDockablePresenter>()
7981
.WhenInjectedInto<CodeExplorerCommand>()
8082
.InSingletonScope()
8183
.WithConstructorArgument<IDockableUserControl>(new CodeExplorerWindow { ViewModel = _kernel.Get<CodeExplorerViewModel>() });
8284

85+
Bind<IPresenter>().To<ToDoExplorerDockablePresenter>()
86+
.WhenInjectedInto<ToDoExplorerCommand>()
87+
.InSingletonScope()
88+
.WithConstructorArgument<IDockableUserControl>(new ToDoExplorerWindow { ViewModel = _kernel.Get<ToDoExplorerViewModel>() });
89+
8390
BindWindowsHooks();
8491
Debug.Print("completed RubberduckModule.Load()");
8592
}

RetailCoder.VBE/Rubberduck.csproj

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -294,6 +294,9 @@
294294
<Compile Include="Common\WinAPI\User32.cs" />
295295
<Compile Include="Common\WinAPI\WindowLongFlags.cs" />
296296
<Compile Include="Common\WinAPI\WM.cs" />
297+
<Compile Include="Controls\GroupingGrid\GroupingGrid.xaml.cs">
298+
<DependentUpon>GroupingGrid.xaml</DependentUpon>
299+
</Compile>
297300
<Compile Include="Inspections\CodeInspectionQuickFix.cs" />
298301
<Compile Include="Inspections\SelfAssignedDeclarationInspection.cs" />
299302
<Compile Include="Inspections\SelfAssignedDeclarationInspectionResult.cs" />
@@ -616,6 +619,12 @@
616619
<DependentUpon>ChangesControl.cs</DependentUpon>
617620
</Compile>
618621
<Compile Include="UI\SourceControl\ChangesPresenter.cs" />
622+
<Compile Include="UI\SourceControl\CloneRepositoryForm.cs">
623+
<SubType>Form</SubType>
624+
</Compile>
625+
<Compile Include="UI\SourceControl\CloneRepositoryForm.Designer.cs">
626+
<DependentUpon>CloneRepositoryForm.cs</DependentUpon>
627+
</Compile>
619628
<Compile Include="UI\SourceControl\CreateBranchForm.cs">
620629
<SubType>Form</SubType>
621630
</Compile>
@@ -637,6 +646,7 @@
637646
</Compile>
638647
<Compile Include="UI\SourceControl\IBranchesView.cs" />
639648
<Compile Include="UI\SourceControl\IChangesView.cs" />
649+
<Compile Include="UI\SourceControl\ICloneRepositoryView.cs" />
640650
<Compile Include="UI\SourceControl\ICreateBranchView.cs" />
641651
<Compile Include="UI\SourceControl\IDeleteBranchView.cs" />
642652
<Compile Include="UI\SourceControl\IMergeView.cs" />
@@ -763,7 +773,11 @@
763773
<DependentUpon>TodoListSettingsUserControl.cs</DependentUpon>
764774
</Compile>
765775
<Compile Include="UI\Settings\TodoSettingPresenter.cs" />
776+
<Compile Include="UI\ToDoItems\ToDoExplorerControl.xaml.cs">
777+
<DependentUpon>ToDoExplorerControl.xaml</DependentUpon>
778+
</Compile>
766779
<Compile Include="UI\ToDoItems\ToDoExplorerDockablePresenter.cs" />
780+
<Compile Include="UI\ToDoItems\ToDoExplorerViewModel.cs" />
767781
<Compile Include="UI\ToDoItems\ToDoItemClickEventArgs.cs" />
768782
<Compile Include="UI\BindableSelectedItemBehavior.cs" />
769783
<Compile Include="UI\UnitTesting\StandardModuleTestExplorerModel.cs" />
@@ -858,14 +872,17 @@
858872
<EmbeddedResource Include="UI\RubberduckUI.de.resx">
859873
<Generator>PublicResXFileCodeGenerator</Generator>
860874
<LastGenOutput>RubberduckUI.de.Designer.cs</LastGenOutput>
875+
<SubType>Designer</SubType>
861876
</EmbeddedResource>
862877
<EmbeddedResource Include="UI\RubberduckUI.ja.resx">
863878
<Generator>PublicResXFileCodeGenerator</Generator>
864879
<LastGenOutput>RubberduckUI.ja.Designer.cs</LastGenOutput>
880+
<SubType>Designer</SubType>
865881
</EmbeddedResource>
866882
<EmbeddedResource Include="UI\RubberduckUI.sv.resx">
867883
<Generator>PublicResXFileCodeGenerator</Generator>
868884
<LastGenOutput>RubberduckUI.sv.Designer.cs</LastGenOutput>
885+
<SubType>Designer</SubType>
869886
</EmbeddedResource>
870887
<EmbeddedResource Include="UI\Settings\AddMarkerForm.resx">
871888
<DependentUpon>AddMarkerForm.cs</DependentUpon>
@@ -916,6 +933,9 @@
916933
<EmbeddedResource Include="UI\SourceControl\ChangesControl.resx">
917934
<DependentUpon>ChangesControl.cs</DependentUpon>
918935
</EmbeddedResource>
936+
<EmbeddedResource Include="UI\SourceControl\CloneRepositoryForm.resx">
937+
<DependentUpon>CloneRepositoryForm.cs</DependentUpon>
938+
</EmbeddedResource>
919939
<EmbeddedResource Include="UI\SourceControl\CreateBranchForm.resx">
920940
<DependentUpon>CreateBranchForm.cs</DependentUpon>
921941
</EmbeddedResource>
@@ -939,6 +959,7 @@
939959
</EmbeddedResource>
940960
<EmbeddedResource Include="UI\ToDoItems\ToDoExplorerWindow.resx">
941961
<DependentUpon>ToDoExplorerWindow.cs</DependentUpon>
962+
<SubType>Designer</SubType>
942963
</EmbeddedResource>
943964
<EmbeddedResource Include="UI\UnitTesting\TestExplorerWindow.resx">
944965
<DependentUpon>TestExplorerWindow.cs</DependentUpon>
@@ -1330,6 +1351,10 @@
13301351
</ProjectReference>
13311352
</ItemGroup>
13321353
<ItemGroup>
1354+
<Page Include="Controls\GroupingGrid\GroupingGrid.xaml">
1355+
<SubType>Designer</SubType>
1356+
<Generator>MSBuild:Compile</Generator>
1357+
</Page>
13331358
<Page Include="UI\BusyIndicator.xaml">
13341359
<SubType>Designer</SubType>
13351360
<Generator>MSBuild:Compile</Generator>
@@ -1346,6 +1371,10 @@
13461371
<SubType>Designer</SubType>
13471372
<Generator>MSBuild:Compile</Generator>
13481373
</Page>
1374+
<Page Include="UI\ToDoItems\ToDoExplorerControl.xaml">
1375+
<SubType>Designer</SubType>
1376+
<Generator>MSBuild:Compile</Generator>
1377+
</Page>
13491378
<Page Include="UI\UnitTesting\TestExplorerControl.xaml">
13501379
<SubType>Designer</SubType>
13511380
<Generator>MSBuild:Compile</Generator>

RetailCoder.VBE/Settings/Configuration.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ public Configuration()
1515

1616
public Configuration(UserSettings userSettings)
1717
{
18-
this.UserSettings = userSettings;
18+
UserSettings = userSettings;
1919
}
2020
}
2121
}

RetailCoder.VBE/Settings/SourceControlConfiguration.cs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,10 @@ public class SourceControlConfiguration : ISourceControlUserSettings
1919

2020
public SourceControlConfiguration()
2121
{
22-
this.Repositories = new List<Repository>();
23-
this.UserName = string.Empty;
24-
this.EmailAddress = string.Empty;
25-
this.DefaultRepositoryLocation = string.Empty;
22+
Repositories = new List<Repository>();
23+
UserName = string.Empty;
24+
EmailAddress = string.Empty;
25+
DefaultRepositoryLocation = string.Empty;
2626
}
2727

2828
public SourceControlConfiguration
@@ -33,10 +33,10 @@ public SourceControlConfiguration
3333
List<Repository> repositories
3434
)
3535
{
36-
this.Repositories = repositories;
37-
this.UserName = username;
38-
this.EmailAddress = email;
39-
this.DefaultRepositoryLocation = defaultRepoLocation;
36+
Repositories = repositories;
37+
UserName = username;
38+
EmailAddress = email;
39+
DefaultRepositoryLocation = defaultRepoLocation;
4040
}
4141
}
4242
}

RetailCoder.VBE/Settings/SourceControlConfigurationService.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ public class SourceControlConfigurationService : XmlConfigurationServiceBase<Sou
88

99
protected override string ConfigFile
1010
{
11-
get { return Path.Combine(this.rootPath, "SourceControl.rubberduck"); }
11+
get { return Path.Combine(rootPath, "SourceControl.rubberduck"); }
1212
}
1313

1414
public override SourceControlConfiguration LoadConfiguration()

RetailCoder.VBE/Settings/ToDoListSettings.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ public ToDoListSettings()
2020

2121
public ToDoListSettings(ToDoMarker[] markers)
2222
{
23-
this.ToDoMarkers = markers;
23+
ToDoMarkers = markers;
2424
}
2525
}
2626
}

RetailCoder.VBE/Settings/ToDoMarkers.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ public ToDoMarker(string text, TodoPriority priority)
5454
/// <returns> The Text property. </returns>
5555
public override string ToString()
5656
{
57-
return this.Text;
57+
return Text;
5858
}
5959

6060
public override bool Equals(object obj)

0 commit comments

Comments
 (0)