refactoring
This commit is contained in:
parent
0a374b2e75
commit
d86a2ae1d8
21 changed files with 98 additions and 57 deletions
|
|
@ -12,7 +12,7 @@ namespace BookAStar.ViewModels.EstimateAndBilling
|
|||
public BookQueriesViewModel()
|
||||
{
|
||||
queries = new ObservableCollection<BookQueryViewModel>
|
||||
(DataManager.Current.BookQueries.Select(
|
||||
(DataManager.Instance.BookQueries.Select(
|
||||
q =>
|
||||
new BookQueryViewModel(q)));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@ namespace BookAStar.ViewModels.EstimateAndBilling
|
|||
Previsionnal = data.Previsionnal;
|
||||
Id = data.Id;
|
||||
estimates = new ObservableCollection<Estimate>(
|
||||
DataManager.Current.Estimates.Where(
|
||||
DataManager.Instance.Estimates.Where(
|
||||
e => e.Query.Id == Id
|
||||
));
|
||||
this.data = data;
|
||||
|
|
@ -65,7 +65,7 @@ namespace BookAStar.ViewModels.EstimateAndBilling
|
|||
{
|
||||
get
|
||||
{
|
||||
return DataManager.Current.EstimationCache.LocalGet(this.Id);
|
||||
return DataManager.Instance.EstimationCache.LocalGet(this.Id);
|
||||
}
|
||||
}
|
||||
private ObservableCollection<Estimate> estimates;
|
||||
|
|
|
|||
|
|
@ -28,10 +28,10 @@ namespace BookAStar.ViewModels.Messaging
|
|||
MainSettings.UserChanged += MainSettings_UserChanged;
|
||||
Messages = new ObservableCollection<ChatMessage>();
|
||||
Notifs = new ObservableCollection<ChatMessage>();
|
||||
PVs = DataManager.Current.PrivateMessages;
|
||||
PVs = DataManager.Instance.PrivateMessages;
|
||||
Contacts =
|
||||
new ObservableCollection<UserViewModel>(
|
||||
DataManager.Current.Contacts.Select(c=>new UserViewModel { Data = c }));
|
||||
DataManager.Instance.Contacts.Select(c=>new UserViewModel { Data = c }));
|
||||
App.ChatHubProxy.On<string, string>("addMessage", (n, m) =>
|
||||
{
|
||||
Messages.Add(new ChatMessage
|
||||
|
|
|
|||
|
|
@ -192,7 +192,7 @@ namespace BookAStar.ViewModels.UserProfile
|
|||
{
|
||||
newUserIsPro = UserIsPro;
|
||||
|
||||
newQueryCount = newUserIsPro ? DataManager.Current.BookQueries.Count : 0;
|
||||
newQueryCount = newUserIsPro ? DataManager.Instance.BookQueries.Count : 0;
|
||||
|
||||
newStatusString = newUserIsPro ?
|
||||
$"Profile professionel renseigné" :
|
||||
|
|
|
|||
|
|
@ -198,7 +198,7 @@ namespace BookAStar.ViewModels.UserProfile
|
|||
{
|
||||
newUserIsPro = UserIsPro;
|
||||
|
||||
newQueryCount = newUserIsPro ? DataManager.Current.BookQueries.Count : 0;
|
||||
newQueryCount = newUserIsPro ? DataManager.Instance.BookQueries.Count : 0;
|
||||
|
||||
newStatusString = newUserIsPro ?
|
||||
$"Profile professionel renseigné" :
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue