Exemple #1
0
        public void StartMeeting()
        {
            MeetingView mv = new MeetingView(StartMeetingCallbackEvent, ExitMeetingCallbackEvent);

            //MeetingView mv =
            //    DependencyResolver.Current.Container.Resolve<MeetingView>(
            //        new TypedParameter(typeof(Action<bool, string>), StartMeetingCallbackEvent),
            //        new TypedParameter(typeof(Action<bool, string>), ExitMeetingCallbackEvent));
            mv.Show();
        }
Exemple #2
0
        public void StartMeeting()
        {
            MeetingView mv = new MeetingView(StartMeetingCallbackEvent, ExitMeetingCallbackEvent);

            //MeetingView mv =
            //    IoC.Get<MeetingView>(
            //        new TypedParameter(typeof(Action<bool, string>), StartMeetingCallbackEvent),
            //        new TypedParameter(typeof(Action<bool, string>), ExitMeetingCallbackEvent));
            mv.Show();
        }
Exemple #3
0
        private List <ViewFrame> InitializeViewFrameList(MeetingView meetingView)
        {
            List <ViewFrame> viewFrames = new List <ViewFrame>();

            ViewFrame1 = new ViewFrame(meetingView.PictureBox1.Handle, meetingView.PictureBox1);
            ViewFrame2 = new ViewFrame(meetingView.PictureBox2.Handle, meetingView.PictureBox2);
            ViewFrame3 = new ViewFrame(meetingView.PictureBox3.Handle, meetingView.PictureBox3);
            ViewFrame4 = new ViewFrame(meetingView.PictureBox4.Handle, meetingView.PictureBox4);
            ViewFrame5 = new ViewFrame(meetingView.PictureBox5.Handle, meetingView.PictureBox5);

            viewFrames.Add(ViewFrame1);
            viewFrames.Add(ViewFrame2);
            viewFrames.Add(ViewFrame3);
            viewFrames.Add(ViewFrame4);
            viewFrames.Add(ViewFrame5);

            return(viewFrames);
        }
Exemple #4
0
        public MeetingViewModel(MeetingView meetingView, Action <bool, string> startMeetingCallback,
                                Action <bool, string> exitMeetingCallback)
        {
            _meetingView = meetingView;

            _viewLayoutService = DependencyResolver.Current.Container.Resolve <IViewLayout>();
            _viewLayoutService.ViewFrameList = InitializeViewFrameList(meetingView);

            _sdkService = DependencyResolver.Current.Container.Resolve <ISdk>();
            _bmsService = DependencyResolver.Current.Container.Resolve <IBms>();

            _localPushLiveService = DependencyResolver.Current.Container.ResolveNamed <IPushLive>(GlobalResources.LocalPushLive);
            _localPushLiveService.ResetStatus();
            _serverPushLiveService = DependencyResolver.Current.Container.ResolveNamed <IPushLive>(GlobalResources.RemotePushLive);
            _serverPushLiveService.ResetStatus();
            _localRecordService = DependencyResolver.Current.Container.Resolve <IRecord>();
            _localRecordService.ResetStatus();

            _startMeetingCallbackEvent = startMeetingCallback;
            _exitMeetingCallbackEvent  = exitMeetingCallback;

            MeetingId       = _sdkService.MeetingId;
            SpeakingStatus  = IsNotSpeaking;
            SelfDescription = $"{_sdkService.SelfName}-{_sdkService.SelfPhoneId}";

            _lessonDetail = DependencyResolver.Current.Container.Resolve <LessonDetail>();
            _userInfo     = DependencyResolver.Current.Container.Resolve <UserInfo>();
            _userInfos    = DependencyResolver.Current.Container.Resolve <List <UserInfo> >();

            MeetingOrLesson = _lessonDetail.Id == 0 ? "会议号:" : "课程号:";
            LessonName      = string.IsNullOrEmpty(_lessonDetail.Name)
                ? string.Empty
                : string.Format($"课程名:{_lessonDetail.Name}");

            LoadCommand        = DelegateCommand.FromAsyncHandler(JoinMeetingAsync);
            ModeChangedCommand = DelegateCommand <string> .FromAsyncHandler(MeetingModeChangedAsync);

            SpeakingStatusChangedCommand = DelegateCommand.FromAsyncHandler(SpeakingStatusChangedAsync);
            ExternalDataChangedCommand   = DelegateCommand <string> .FromAsyncHandler(ExternalDataChangedAsync);

            SharingDesktopCommand = DelegateCommand.FromAsyncHandler(SharingDesktopAsync);
            CancelSharingCommand  = DelegateCommand.FromAsyncHandler(CancelSharingAsync);
            ExitCommand           = DelegateCommand.FromAsyncHandler(ExitAsync);
            OpenExitDialogCommand = DelegateCommand.FromAsyncHandler(OpenExitDialogAsync);
            CancelCommand         = DelegateCommand.FromAsyncHandler(CancelAsync);
            KickoutCommand        = DelegateCommand <string> .FromAsyncHandler(KickoutAsync);

            OpenCloseCameraCommand = DelegateCommand.FromAsyncHandler(OpenCloseCameraAsync);
            GetCameraInfoCommand   = DelegateCommand <string> .FromAsyncHandler(GetCameraInfoAsync);

            OpenPropertyPageCommand = DelegateCommand <string> .FromAsyncHandler(OpenPropertyPageAsync);

            SetDefaultDataCameraCommand = DelegateCommand <string> .FromAsyncHandler(SetDefaultDataCameraAsync);

            SetDefaultFigureCameraCommand = DelegateCommand <string> .FromAsyncHandler(SetDefaultFigureCameraAsync);

            SetMicStateCommand = DelegateCommand.FromAsyncHandler(SetMicStateAsync);
            ScreenShareCommand = DelegateCommand.FromAsyncHandler(ScreenShareAsync);
            StartSpeakCommand  = DelegateCommand <string> .FromAsyncHandler(StartSpeakAsync);

            StopSpeakCommand = DelegateCommand <string> .FromAsyncHandler(StopSpeakAsync);

            BanToSpeakCommand = DelegateCommand <string> .FromAsyncHandler(BanToSpeakAsync);

            AllowToSpeakCommand = DelegateCommand <string> .FromAsyncHandler(AllowToSpeakAsync);

            RecordCommand         = DelegateCommand.FromAsyncHandler(RecordAsync);
            PushLiveCommand       = DelegateCommand.FromAsyncHandler(PushLiveAsync);
            TopMostTriggerCommand = new DelegateCommand(TriggerTopMost);
            ShowLogCommand        = DelegateCommand.FromAsyncHandler(ShowLogAsync);
            TriggerMenuCommand    = new DelegateCommand(TriggerMenu);
            InitializeMenuItems();
            RegisterMeetingEvents();
        }