Skip to content

Commit f006282

Browse files
committed
removed viewmodelbuilder
1 parent 1ff91b3 commit f006282

File tree

3 files changed

+25
-72
lines changed

3 files changed

+25
-72
lines changed

RetailCoder.VBE/Rubberduck.csproj

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -378,7 +378,6 @@
378378
<DependentUpon>CodeExplorerControl.xaml</DependentUpon>
379379
</Compile>
380380
<Compile Include="UI\CodeExplorer\CodeExplorerViewModel.cs" />
381-
<Compile Include="UI\CodeExplorer\CodeExplorerViewModelBuilder.cs" />
382381
<Compile Include="UI\CodeInspections\InspectionDescriptionConverter.cs" />
383382
<Compile Include="UI\CodeInspections\InspectionImageSourceConverter.cs" />
384383
<Compile Include="UI\CodeInspections\InspectionResultsControl.xaml.cs">

RetailCoder.VBE/UI/CodeExplorer/CodeExplorerViewModel.cs

Lines changed: 25 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,31 +11,49 @@ namespace Rubberduck.UI.CodeExplorer
1111
public class CodeExplorerViewModel : ViewModelBase
1212
{
1313
private readonly RubberduckParserState _state;
14-
private readonly ObservableCollection<ExplorerItemViewModel> _children;
1514

16-
public CodeExplorerViewModel(RubberduckParserState state, ObservableCollection<ExplorerItemViewModel> children)
15+
public CodeExplorerViewModel(RubberduckParserState state)
1716
{
1817
_state = state;
19-
_children = children;
18+
_state.StateChanged += ParserState_StateChanged;
19+
_state.ModuleStateChanged += ParserState_ModuleStateChanged;
2020
}
2121

2222
private bool _isBusy;
2323
public bool IsBusy { get { return _isBusy; } set { _isBusy = value; OnPropertyChanged(); } }
2424

25+
private void ParserState_StateChanged(object sender, EventArgs e)
26+
{
27+
IsBusy = _state.Status == ParserState.Parsing;
28+
}
29+
30+
private void ParserState_ModuleStateChanged(object sender, Parsing.ParseProgressEventArgs e)
31+
{
32+
33+
}
34+
}
2535

36+
public class ExplorerProjectItemViewModel : ViewModelBase
37+
{
38+
39+
}
40+
41+
public class ExplorerComponentItemViewModel : ViewModelBase
42+
{
43+
2644
}
2745

28-
public class ExplorerItemViewModel : ViewModelBase
46+
public class ExplorerMemberViewModel : ViewModelBase
2947
{
3048
private readonly Declaration _declaration;
31-
private readonly ConcurrentStack<ExplorerItemViewModel> _children = new ConcurrentStack<ExplorerItemViewModel>();
49+
private readonly ConcurrentStack<ExplorerMemberViewModel> _children = new ConcurrentStack<ExplorerMemberViewModel>();
3250

33-
public ExplorerItemViewModel(Declaration declaration)
51+
public ExplorerMemberViewModel(Declaration declaration)
3452
{
3553
_declaration = declaration;
3654
}
3755

38-
public void AddChild(ExplorerItemViewModel declaration)
56+
public void AddChild(ExplorerMemberViewModel declaration)
3957
{
4058
_children.Push(declaration);
4159
}

RetailCoder.VBE/UI/CodeExplorer/CodeExplorerViewModelBuilder.cs

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

0 commit comments

Comments
 (0)