Skip to content

Commit 77666b2

Browse files
author
Declan Taylor
committed
Consolidates
1 parent 90d9a83 commit 77666b2

File tree

17 files changed

+70
-507
lines changed

17 files changed

+70
-507
lines changed

source/Demos/SuggestBoxTestLib/DataSources/Auto/AutoSuggestSource.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
using Infrastructure;
1+
using CachedPathSuggestBox.Demo.Infrastructure;
2+
using Infrastructure;
23

34
namespace SuggestBoxTestLib.DataSources.Auto
45
{

source/Demos/SuggestBoxTestLib/DataSources/Directory/DirectorySuggestSource.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
 using Infrastructure;
1+
 using CachedPathSuggestBox.Demo.Infrastructure;
2+
using Infrastructure;
23

34
namespace SuggestBoxTestLib.DataSources
45
{

source/Demos/SuggestBoxTestLib/DataSources/Dummy/DummySuggestions.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44
using System.Threading;
55
using System.Threading.Tasks;
66
using System.Windows.Input;
7+
using CachedPathSuggestBox.Demo.Infrastructure;
78
using Infrastructure;
89
using SuggestBoxTestLib.DataSources.Directory;
9-
using SuggestBoxTestLib.ViewModels;
1010

1111
namespace SuggestBoxTestLib.DataSources.Dummy
1212
{

source/Demos/SuggestBoxTestLib/SuggestBoxTestLib.csproj

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,6 @@
5656
<Compile Include="DataSources\Directory\DirectorySuggestSource.cs" />
5757
<Compile Include="ViewModels\DummySuggestSource.cs" />
5858
<Compile Include="ViewModels\FakeViewModel.cs" />
59-
<Compile Include="ViewModels\FastObservableCollection.cs" />
6059
<Compile Include="Views\DemoView.xaml.cs">
6160
<DependentUpon>DemoView.xaml</DependentUpon>
6261
</Compile>

source/Demos/SuggestBoxTestLib/ViewModels/FastObservableCollection.cs

Lines changed: 0 additions & 191 deletions
This file was deleted.
Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Application
2-
x:Class="ThemedSuggestBoxDemo.App"
3-
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
4-
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
5-
Startup="Application_Startup">
6-
<Application.Resources />
2+
x:Class="ThemedSuggestBoxDemo.App"
3+
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
4+
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
5+
Startup="Application_Startup">
6+
<Application.Resources />
77
</Application>

source/Demos/ThemedSuggestBoxDemo/App.xaml.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ private void Application_Startup(object sender, StartupEventArgs e)
6666

6767
appearance.SetTheme(settings.Themes
6868
, settings.Options.GetOptionValue<string>("Appearance", "ThemeDisplayName")
69-
, ThemeViewModel.GetCurrentAccentColor(settings));
69+
, ThemeLocatorViewModel.GetCurrentAccentColor(settings));
7070

7171
// Construct Application ViewMOdel and mainWindow
7272
_appVM = new ViewModels.AppViewModel(lifeCycle);
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
namespace ThemedSuggestBoxDemo.Models
2+
{
3+
public class LocatorViewModel : Infrastructure.ViewModelBase
4+
{
5+
/// <summary>
6+
/// Gets an instance of the service container and retrieves the requested service component.
7+
/// </summary>
8+
/// <typeparam name="TServiceContract"></typeparam>
9+
/// <returns></returns>
10+
public TServiceContract GetService<TServiceContract>() where TServiceContract : class
11+
{
12+
return ServiceLocator.ServiceContainer.Instance.GetService<TServiceContract>();
13+
}
14+
}
15+
}

source/Demos/ThemedSuggestBoxDemo/ThemedSuggestBoxDemo.csproj

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -43,17 +43,17 @@
4343
<Reference Include="log4net, Version=2.0.8.0, Culture=neutral, PublicKeyToken=669e0ddf0bb1aa2a, processorArchitecture=MSIL">
4444
<HintPath>..\..\packages\log4net.2.0.8\lib\net45-full\log4net.dll</HintPath>
4545
</Reference>
46-
<Reference Include="Microsoft.Xaml.Behaviors, Version=0.0.0.0, Culture=neutral, PublicKeyToken=189c7f39020fabe0, processorArchitecture=MSIL">
47-
<HintPath>..\..\packages\Dirkster.MWindowLib.1.3.0.2\lib\net452\Microsoft.Xaml.Behaviors.dll</HintPath>
46+
<Reference Include="Microsoft.Xaml.Behaviors, Version=1.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
47+
<HintPath>..\..\packages\Dirkster.MWindowLib.1.3.1.2\lib\net452\Microsoft.Xaml.Behaviors.dll</HintPath>
4848
</Reference>
4949
<Reference Include="MLib, Version=1.3.1.2, Culture=neutral, processorArchitecture=MSIL">
5050
<HintPath>..\..\packages\Dirkster.MLib.1.3.1.2\lib\net40\MLib.dll</HintPath>
5151
</Reference>
52-
<Reference Include="MWindowInterfacesLib, Version=1.3.0.0, Culture=neutral, processorArchitecture=MSIL">
53-
<HintPath>..\..\packages\Dirkster.MWindowLib.1.3.0.2\lib\net452\MWindowInterfacesLib.dll</HintPath>
52+
<Reference Include="MWindowInterfacesLib, Version=1.3.1.2, Culture=neutral, processorArchitecture=MSIL">
53+
<HintPath>..\..\packages\Dirkster.MWindowLib.1.3.1.2\lib\net452\MWindowInterfacesLib.dll</HintPath>
5454
</Reference>
55-
<Reference Include="MWindowLib, Version=1.3.0.0, Culture=neutral, processorArchitecture=MSIL">
56-
<HintPath>..\..\packages\Dirkster.MWindowLib.1.3.0.2\lib\net452\MWindowLib.dll</HintPath>
55+
<Reference Include="MWindowLib, Version=1.3.1.2, Culture=neutral, processorArchitecture=MSIL">
56+
<HintPath>..\..\packages\Dirkster.MWindowLib.1.3.1.2\lib\net452\MWindowLib.dll</HintPath>
5757
</Reference>
5858
<Reference Include="System" />
5959
<Reference Include="System.Data" />
@@ -75,12 +75,10 @@
7575
<SubType>Designer</SubType>
7676
</ApplicationDefinition>
7777
<Compile Include="Behaviors\SelectionChangedCommand.cs" />
78+
<Compile Include="Models\LocatorViewModel.cs" />
7879
<Compile Include="ServiceInjector.cs" />
7980
<Compile Include="ViewModels\AppLifeCycleViewModel.cs" />
8081
<Compile Include="ViewModels\AppViewModel.cs" />
81-
<Compile Include="ViewModels\Base\ModelBase.cs" />
82-
<Compile Include="ViewModels\Base\RelayCommand.cs" />
83-
<Compile Include="ViewModels\Base\ViewModelBase.cs" />
8482
<Compile Include="ViewModels\ThemeDefinitionViewModel.cs" />
8583
<Compile Include="ViewModels\ThemeViewModel.cs" />
8684
<Page Include="BindToMLib\SuggestionLibDarkLightBrushs.xaml">
@@ -158,5 +156,8 @@
158156
<Name>SuggestBoxTestLib</Name>
159157
</ProjectReference>
160158
</ItemGroup>
159+
<ItemGroup>
160+
<Folder Include="ViewModels\Base\" />
161+
</ItemGroup>
161162
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
162163
</Project>

source/Demos/ThemedSuggestBoxDemo/ViewModels/AppLifeCycleViewModel.cs

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
namespace ThemedSuggestBoxDemo.ViewModels
1+
using Infrastructure;
2+
3+
namespace ThemedSuggestBoxDemo.ViewModels
24
{
35
using MLib.Interfaces;
46
using Models;
@@ -14,7 +16,7 @@
1416
/// such as: state for shutdown, shutdown_cancel, command for shutdown,
1517
/// and methods for save and load application configuration.
1618
/// </summary>
17-
public class AppLifeCycleViewModel : Base.ViewModelBase
19+
public class AppLifeCycleViewModel : ViewModelBase
1820
{
1921
#region fields
2022

@@ -71,7 +73,7 @@ private set
7173
if (mDialogCloseResult != value)
7274
{
7375
mDialogCloseResult = value;
74-
RaisePropertyChanged(() => DialogCloseResult);
76+
NotifyPropertyChanged(() => DialogCloseResult);
7577
}
7678
}
7779
}
@@ -85,7 +87,7 @@ public ICommand ExitApp
8587
{
8688
if (mExitApp == null)
8789
{
88-
mExitApp = new Base.RelayCommand<object>((p) => AppExit_CommandExecuted(),
90+
mExitApp = new RelayCommand<object>((p) => AppExit_CommandExecuted(),
8991
(p) => Closing_CanExecute());
9092
}
9193

0 commit comments

Comments
 (0)