Mercurial > silverbladetech
annotate MetroWpf/MetroWpf/Locator.cs @ 121:8f94475d3146 tip
final code
author | stevenh7776 |
---|---|
date | Thu, 31 May 2012 15:35:26 +0100 |
parents | a8b50a087544 |
children |
rev | line source |
---|---|
24
a8b50a087544
Stocks and FxRates working, new menu introduced. Working nicely so far
adminsh@apollo
parents:
23
diff
changeset
|
1 using FxRates.UI.ViewModels; |
15
060f02cd4591
Initial commit, pre airport work
stevenh7776 stevenhollidge@hotmail.com
parents:
diff
changeset
|
2 using GalaSoft.MvvmLight; |
16
2395908fa45b
Getting there... 1.20am at BKK airport.
stevenh7776 stevenhollidge@hotmail.com
parents:
15
diff
changeset
|
3 using MetroWpf.Presentation.UserProfile; |
24
a8b50a087544
Stocks and FxRates working, new menu introduced. Working nicely so far
adminsh@apollo
parents:
23
diff
changeset
|
4 using MetroWpf.UI.About; |
a8b50a087544
Stocks and FxRates working, new menu introduced. Working nicely so far
adminsh@apollo
parents:
23
diff
changeset
|
5 using MetroWpf.UI.Login; |
a8b50a087544
Stocks and FxRates working, new menu introduced. Working nicely so far
adminsh@apollo
parents:
23
diff
changeset
|
6 using MetroWpf.UI.Settings; |
a8b50a087544
Stocks and FxRates working, new menu introduced. Working nicely so far
adminsh@apollo
parents:
23
diff
changeset
|
7 using MetroWpf.UI.Shell; |
21
dfc81f8bb838
working version for sttocks except ui within metrowpf
adminsh@apollo
parents:
20
diff
changeset
|
8 using Microsoft.Practices.ServiceLocation; |
23
399398841fd0
Working version for Stocks (including loosely coupled components
adminsh@apollo
parents:
21
diff
changeset
|
9 using Stocks.UI.ViewModels; |
15
060f02cd4591
Initial commit, pre airport work
stevenh7776 stevenhollidge@hotmail.com
parents:
diff
changeset
|
10 |
060f02cd4591
Initial commit, pre airport work
stevenh7776 stevenhollidge@hotmail.com
parents:
diff
changeset
|
11 namespace MetroWpf |
060f02cd4591
Initial commit, pre airport work
stevenh7776 stevenhollidge@hotmail.com
parents:
diff
changeset
|
12 { |
21
dfc81f8bb838
working version for sttocks except ui within metrowpf
adminsh@apollo
parents:
20
diff
changeset
|
13 public class Locator |
15
060f02cd4591
Initial commit, pre airport work
stevenh7776 stevenhollidge@hotmail.com
parents:
diff
changeset
|
14 { |
21
dfc81f8bb838
working version for sttocks except ui within metrowpf
adminsh@apollo
parents:
20
diff
changeset
|
15 public Locator() |
dfc81f8bb838
working version for sttocks except ui within metrowpf
adminsh@apollo
parents:
20
diff
changeset
|
16 { |
dfc81f8bb838
working version for sttocks except ui within metrowpf
adminsh@apollo
parents:
20
diff
changeset
|
17 if (ViewModelBase.IsInDesignModeStatic) |
dfc81f8bb838
working version for sttocks except ui within metrowpf
adminsh@apollo
parents:
20
diff
changeset
|
18 { |
dfc81f8bb838
working version for sttocks except ui within metrowpf
adminsh@apollo
parents:
20
diff
changeset
|
19 // Create design time services and viewmodels |
dfc81f8bb838
working version for sttocks except ui within metrowpf
adminsh@apollo
parents:
20
diff
changeset
|
20 |
dfc81f8bb838
working version for sttocks except ui within metrowpf
adminsh@apollo
parents:
20
diff
changeset
|
21 } |
dfc81f8bb838
working version for sttocks except ui within metrowpf
adminsh@apollo
parents:
20
diff
changeset
|
22 else |
dfc81f8bb838
working version for sttocks except ui within metrowpf
adminsh@apollo
parents:
20
diff
changeset
|
23 { |
dfc81f8bb838
working version for sttocks except ui within metrowpf
adminsh@apollo
parents:
20
diff
changeset
|
24 // Create run time services and view models |
dfc81f8bb838
working version for sttocks except ui within metrowpf
adminsh@apollo
parents:
20
diff
changeset
|
25 } |
dfc81f8bb838
working version for sttocks except ui within metrowpf
adminsh@apollo
parents:
20
diff
changeset
|
26 } |
15
060f02cd4591
Initial commit, pre airport work
stevenh7776 stevenhollidge@hotmail.com
parents:
diff
changeset
|
27 |
24
a8b50a087544
Stocks and FxRates working, new menu introduced. Working nicely so far
adminsh@apollo
parents:
23
diff
changeset
|
28 public ShellViewModel ShellViewModel |
21
dfc81f8bb838
working version for sttocks except ui within metrowpf
adminsh@apollo
parents:
20
diff
changeset
|
29 { |
24
a8b50a087544
Stocks and FxRates working, new menu introduced. Working nicely so far
adminsh@apollo
parents:
23
diff
changeset
|
30 get { return ServiceLocator.Current.GetInstance<ShellViewModel>(); } |
21
dfc81f8bb838
working version for sttocks except ui within metrowpf
adminsh@apollo
parents:
20
diff
changeset
|
31 } |
16
2395908fa45b
Getting there... 1.20am at BKK airport.
stevenh7776 stevenhollidge@hotmail.com
parents:
15
diff
changeset
|
32 |
21
dfc81f8bb838
working version for sttocks except ui within metrowpf
adminsh@apollo
parents:
20
diff
changeset
|
33 public LoginViewModel LoginViewModel |
dfc81f8bb838
working version for sttocks except ui within metrowpf
adminsh@apollo
parents:
20
diff
changeset
|
34 { |
dfc81f8bb838
working version for sttocks except ui within metrowpf
adminsh@apollo
parents:
20
diff
changeset
|
35 get { return ServiceLocator.Current.GetInstance<LoginViewModel>(); } |
dfc81f8bb838
working version for sttocks except ui within metrowpf
adminsh@apollo
parents:
20
diff
changeset
|
36 } |
16
2395908fa45b
Getting there... 1.20am at BKK airport.
stevenh7776 stevenhollidge@hotmail.com
parents:
15
diff
changeset
|
37 |
21
dfc81f8bb838
working version for sttocks except ui within metrowpf
adminsh@apollo
parents:
20
diff
changeset
|
38 public UserProfileViewModel UserProfileViewModel |
dfc81f8bb838
working version for sttocks except ui within metrowpf
adminsh@apollo
parents:
20
diff
changeset
|
39 { |
dfc81f8bb838
working version for sttocks except ui within metrowpf
adminsh@apollo
parents:
20
diff
changeset
|
40 get { return ServiceLocator.Current.GetInstance<UserProfileViewModel>(); } |
dfc81f8bb838
working version for sttocks except ui within metrowpf
adminsh@apollo
parents:
20
diff
changeset
|
41 } |
dfc81f8bb838
working version for sttocks except ui within metrowpf
adminsh@apollo
parents:
20
diff
changeset
|
42 |
dfc81f8bb838
working version for sttocks except ui within metrowpf
adminsh@apollo
parents:
20
diff
changeset
|
43 public SettingsViewModel SettingsViewModel |
dfc81f8bb838
working version for sttocks except ui within metrowpf
adminsh@apollo
parents:
20
diff
changeset
|
44 { |
dfc81f8bb838
working version for sttocks except ui within metrowpf
adminsh@apollo
parents:
20
diff
changeset
|
45 get { return ServiceLocator.Current.GetInstance<SettingsViewModel>(); } |
dfc81f8bb838
working version for sttocks except ui within metrowpf
adminsh@apollo
parents:
20
diff
changeset
|
46 } |
16
2395908fa45b
Getting there... 1.20am at BKK airport.
stevenh7776 stevenhollidge@hotmail.com
parents:
15
diff
changeset
|
47 |
21
dfc81f8bb838
working version for sttocks except ui within metrowpf
adminsh@apollo
parents:
20
diff
changeset
|
48 public AboutViewModel AboutViewModel |
dfc81f8bb838
working version for sttocks except ui within metrowpf
adminsh@apollo
parents:
20
diff
changeset
|
49 { |
dfc81f8bb838
working version for sttocks except ui within metrowpf
adminsh@apollo
parents:
20
diff
changeset
|
50 get { return ServiceLocator.Current.GetInstance<AboutViewModel>(); } |
dfc81f8bb838
working version for sttocks except ui within metrowpf
adminsh@apollo
parents:
20
diff
changeset
|
51 } |
16
2395908fa45b
Getting there... 1.20am at BKK airport.
stevenh7776 stevenhollidge@hotmail.com
parents:
15
diff
changeset
|
52 |
21
dfc81f8bb838
working version for sttocks except ui within metrowpf
adminsh@apollo
parents:
20
diff
changeset
|
53 public StocksViewModel StocksViewModel |
dfc81f8bb838
working version for sttocks except ui within metrowpf
adminsh@apollo
parents:
20
diff
changeset
|
54 { |
dfc81f8bb838
working version for sttocks except ui within metrowpf
adminsh@apollo
parents:
20
diff
changeset
|
55 get { return ServiceLocator.Current.GetInstance<StocksViewModel>(); } |
dfc81f8bb838
working version for sttocks except ui within metrowpf
adminsh@apollo
parents:
20
diff
changeset
|
56 } |
20 | 57 |
24
a8b50a087544
Stocks and FxRates working, new menu introduced. Working nicely so far
adminsh@apollo
parents:
23
diff
changeset
|
58 public FxRatesViewModel FxRatesViewModel |
21
dfc81f8bb838
working version for sttocks except ui within metrowpf
adminsh@apollo
parents:
20
diff
changeset
|
59 { |
24
a8b50a087544
Stocks and FxRates working, new menu introduced. Working nicely so far
adminsh@apollo
parents:
23
diff
changeset
|
60 get { return ServiceLocator.Current.GetInstance<FxRatesViewModel>(); } |
21
dfc81f8bb838
working version for sttocks except ui within metrowpf
adminsh@apollo
parents:
20
diff
changeset
|
61 } |
24
a8b50a087544
Stocks and FxRates working, new menu introduced. Working nicely so far
adminsh@apollo
parents:
23
diff
changeset
|
62 |
a8b50a087544
Stocks and FxRates working, new menu introduced. Working nicely so far
adminsh@apollo
parents:
23
diff
changeset
|
63 //public IWpfApplication WpfApplication |
a8b50a087544
Stocks and FxRates working, new menu introduced. Working nicely so far
adminsh@apollo
parents:
23
diff
changeset
|
64 //{ |
a8b50a087544
Stocks and FxRates working, new menu introduced. Working nicely so far
adminsh@apollo
parents:
23
diff
changeset
|
65 // get { return ServiceLocator.Current.GetInstance<WpfApplication>(); } |
a8b50a087544
Stocks and FxRates working, new menu introduced. Working nicely so far
adminsh@apollo
parents:
23
diff
changeset
|
66 //} |
20 | 67 } |
15
060f02cd4591
Initial commit, pre airport work
stevenh7776 stevenhollidge@hotmail.com
parents:
diff
changeset
|
68 } |