コード例 #1
0
ファイル: YapperChatViewModel.cs プロジェクト: nrag/yapper
        public YapperChatViewModel(bool startup)
        {
            Messenger.Default.Register<RefreshGroupsEvent>(this, this.ReadGroupsRefreshContactsPage);

            this.conversationsViewModel = ViewModelLocator.Instance.CreateOrGetViewModel<AllConversationsViewModel>();
            this.newTaskCountViewModel = ViewModelLocator.Instance.CreateOrGetViewModel<NewTaskCountViewModel>();
            this.newMessageCountViewModel = ViewModelLocator.Instance.CreateOrGetViewModel<NewMessageCountViewModel>();

            if (!startup)
            {
                this.registeredUsersViewModel = ViewModelLocator.Instance.CreateOrGetViewModel<RegisteredUsersViewModel>();
                this.groupsViewModel = ViewModelLocator.Instance.CreateOrGetViewModel<AllGroupsViewModel>();
                this.tasksViewModel = ViewModelLocator.Instance.CreateOrGetViewModel<AllTasksViewModel>();
            }
        }
コード例 #2
0
ファイル: YapperChatViewModel.cs プロジェクト: nrag/yapper
        public YapperChatViewModel(bool startup)
        {
            Messenger.Default.Register <RefreshGroupsEvent>(this, this.ReadGroupsRefreshContactsPage);

            this.conversationsViewModel   = ViewModelLocator.Instance.CreateOrGetViewModel <AllConversationsViewModel>();
            this.newTaskCountViewModel    = ViewModelLocator.Instance.CreateOrGetViewModel <NewTaskCountViewModel>();
            this.newMessageCountViewModel = ViewModelLocator.Instance.CreateOrGetViewModel <NewMessageCountViewModel>();

            if (!startup)
            {
                this.registeredUsersViewModel = ViewModelLocator.Instance.CreateOrGetViewModel <RegisteredUsersViewModel>();
                this.groupsViewModel          = ViewModelLocator.Instance.CreateOrGetViewModel <AllGroupsViewModel>();
                this.tasksViewModel           = ViewModelLocator.Instance.CreateOrGetViewModel <AllTasksViewModel>();
            }
        }