コード例 #1
0
        public InteractiveContentViewModel(InteractiveContentView interactiveContentView)
        {
            _interactiveContentView = interactiveContentView;

            _bmsService            = IoC.Get <IBms>();
            _sdkService            = IoC.Get <IMeeting>();
            _lessonInfo            = IoC.Get <LessonInfo>();
            _groupManager          = IoC.Get <IGroupManager>();
            _visualizeShellService = IoC.Get <IVisualizeShell>();
            _eventAggregator       = IoC.Get <IEventAggregator>();
            _regionManager         = IoC.Get <IRegionManager>();

            _eventAggregator.GetEvent <CommandReceivedEvent>()
            .Subscribe(ExecuteCommand, ThreadOption.PublisherThread, false,
                       command => command.Directive == GlobalCommands.Instance.GotoClassCommand.Directive);
            ParticipateOrWatchCommand = DelegateCommand.FromAsyncHandler(ParticipateOrWatchAsync);
            SelectionChangedCommand   = DelegateCommand <LessonInfo> .FromAsyncHandler(SelectionChangedAsync);

            LoadCommand           = DelegateCommand.FromAsyncHandler(LoadAsync);
            RefreshCommand        = DelegateCommand.FromAsyncHandler(RefreshAsync);
            CloseMainPointCommand = new DelegateCommand(() => { ShowMainPoint = false; });
            ShowMainPointCommand  = new DelegateCommand(() => { ShowMainPoint = true; });
            GotoSettingCommand    = new DelegateCommand(GotoSetting);

            Attendees = new ObservableCollection <UserInfo>();
            Lessons   = new ObservableCollection <LessonInfo>();
        }
コード例 #2
0
        public InteractiveContentViewModel(InteractiveContentView interactiveContentView)
        {
            _interactiveContentView = interactiveContentView;

            _bmsService            = DependencyResolver.Current.GetService <IBms>();
            _sdkService            = DependencyResolver.Current.GetService <ISdk>();
            _lessonInfo            = DependencyResolver.Current.GetService <LessonInfo>();
            _groupManager          = DependencyResolver.Current.GetService <IGroupManager>();
            _visualizeShellService = DependencyResolver.Current.GetService <IVisualizeShell>();

            ParticipateOrWatchCommand = DelegateCommand.FromAsyncHandler(ParticipateOrWatchAsync);
            SelectionChangedCommand   = DelegateCommand <LessonInfo> .FromAsyncHandler(SelectionChangedAsync);

            LoadCommand           = DelegateCommand.FromAsyncHandler(LoadAsync);
            RefreshCommand        = DelegateCommand.FromAsyncHandler(RefreshAsync);
            CloseMainPointCommand = new DelegateCommand(() => { ShowMainPoint = false; });
            ShowMainPointCommand  = new DelegateCommand(() => { ShowMainPoint = true; });
            GotoSettingCommand    = new DelegateCommand(GotoSetting);

            Attendees = new ObservableCollection <UserInfo>();
            Lessons   = new ObservableCollection <LessonInfo>();
        }