Ejemplo n.º 1
0
 private void SetFeatureLayout()
 {
     // BigSmalls 一大多小画面布局
     if (_windowManager.LayoutChange(WindowNames.MainWindow, LayoutRenderType.BigSmallsLayout))
     {
     }
     //if (_windowManager.LayoutChange(WindowNames.ExtendedWindow, LayoutRenderType.BigSmallsLayout))
     //{
     //}
 }
        private void LoadedAsync()
        {
            List <Participant> participants = new List <Participant>();

            participants.Add(_windowManager.Participant);

            foreach (var participant in _windowManager.Participants)
            {
                participants.Add(participant);
            }

            var attendees = from p in participants
                            select new AttendeeItem()
            {
                Text = p.Account.AccountName,
                Id   = p.Account.AccountId.ToString(),
                //Hwnd = videobox.Handle,
                ButtonCommand = new DelegateCommand <AttendeeItem>((attendeeItem) =>
                {
                    _windowManager.VideoBoxManager.SetProperty(_targetSpecialViewType.ToString(), attendeeItem.Text);


                    _windowManager.LayoutChange(WindowNames.MainWindow, _targetSpecialViewType);
                    _selectAttendeeListView.Close();
                })
            };

            attendees.ToList().ForEach(attendee =>
            {
                AttendeeItems.Add(attendee);
            });

            InputSimulatorManager.Instance.Simulator.Keyboard.KeyPress(VirtualKeyCode.TAB);
            //InputSimulatorManager.Instance.Simulator.Keyboard.KeyPress(VirtualKeyCode.TAB);
        }
Ejemplo n.º 3
0
        private void SetSpecialViewAsync(TextWithButtonItem attendeeViewItem)
        {
            var specialView = _windowManager.VideoBoxManager.Items.FirstOrDefault(v => v.AccountResource != null && v.AccountResource.AccountModel.AccountId.ToString() == attendeeViewItem.Id && v.Handle == attendeeViewItem.Hwnd);

            if (specialView == null)
            {
                MessageQueueManager.Instance.AddWarning("找不到该视图!");
                return;
            }

            _windowManager.VideoBoxManager.SetProperty(_targetPictureMode.ToString(), specialView.Name);

            try
            {
                if (!_windowManager.LayoutChange(WindowNames.MainWindow, _targetPictureMode))
                {
                    MessageQueueManager.Instance.AddError("无法设置一大一小画面模式!");
                }
                //if (_windowManager.LayoutChange(WindowNames.ExtendedWindow, _targetPictureMode))
                //{
                //}
            }
            catch (Exception ex)
            {
                MessageQueueManager.Instance.AddError(ex.Message);
            }
        }
Ejemplo n.º 4
0
        private void CheckPictureModeAsync(object args)
        {
            if (args is KeyEventArgs)
            {
                KeyEventArgs keyEventArgs = (KeyEventArgs)args;

                switch (keyEventArgs.Key)
                {
                case Key.Enter:
                    InputSimulatorManager.Instance.InputSimu.Keyboard.KeyPress(VirtualKeyCode.SPACE);
                    keyEventArgs.Handled = true;
                    break;
                }
            }


            if (args is LayoutRenderType)
            {
                LayoutRenderType pictureMode = (LayoutRenderType)args;

                switch (pictureMode)
                {
                case LayoutRenderType.AutoLayout:
                case LayoutRenderType.AverageLayout:

                    if (_windowManager.LayoutChange(WindowNames.MainWindow, pictureMode))
                    {
                    }
                    //if (_windowManager.LayoutChange(WindowNames.ExtendedWindow, pictureMode))
                    //{
                    //}

                    break;

                case LayoutRenderType.CloseupLayout:
                case LayoutRenderType.BigSmallsLayout:

                    SetSpecialView setSpecialView = new SetSpecialView(pictureMode);
                    setSpecialView.ShowDialog();
                    setSpecialView.Focus();
                    break;
                }

                if (pictureMode != _windowManager.LayoutRendererStore.CurrentLayoutRenderType)
                {
                    CheckPictureMode();
                }
            }
        }
Ejemplo n.º 5
0
 private void SetAverageLayoutAsync()
 {
     _windowManager.LayoutChange(WindowNames.MainWindow, LayoutRenderType.AverageLayout);
     _layoutView.Close();
 }