public MeetingWindowManager(IEventAggregator eventAggregator)
        {
            _eventAggregator    = eventAggregator;
            _meetingSdkWrapper  = IoC.Get <IMeetingSdkAgent>();
            _deviceNameAccessor = IoC.Get <IDeviceNameAccessor>();

            LayoutRendererStore = new LayoutRendererStore();
            ModeDisplayerStore  = new ModeDisplayerStore();

            _layoutWindows = new List <ILayoutWindow>();
            _layoutWindows.Add(this);
        }
        public bool ModeChange(ModeDisplayerType modeDisplayerType)
        {
            _eventAggregator.GetEvent <RefreshCanvasEvent>().Publish();

            IScreen screen = VideoBoxManager as IScreen;

            try
            {
                if (modeDisplayerType != ModeDisplayerStore.CurrentModeDisplayerType)
                {
                    LayoutRendererStore.CurrentLayoutRenderType = LayoutRenderType.AutoLayout;
                }


                if (ModeDisplayerStore.Create(modeDisplayerType).Display(GetVisibleVideoBoxs(), screen.Size))
                {
                    ModeDisplayerStore.CurrentModeDisplayerType = modeDisplayerType;

                    _eventAggregator.GetEvent <ModeDisplayerTypeChangedEvent>().Publish(modeDisplayerType);

                    if (LayoutRendererStore.CurrentLayoutRenderType != LayoutRenderType.AutoLayout)
                    {
                        LayoutChange(LayoutRendererStore.CurrentLayoutRenderType);
                    }

                    return(true);
                }
                else if (ModeDisplayerStore.Create(ModeDisplayerType.InteractionMode).Display(GetVisibleVideoBoxs(), screen.Size))
                {
                    ModeDisplayerStore.CurrentModeDisplayerType = ModeDisplayerType.InteractionMode;

                    _eventAggregator.GetEvent <ModeDisplayerTypeChangedEvent>().Publish(ModeDisplayerType.InteractionMode);

                    if (LayoutRendererStore.CurrentLayoutRenderType != LayoutRenderType.AutoLayout)
                    {
                        LayoutChange(LayoutRendererStore.CurrentLayoutRenderType);
                    }

                    return(false);
                }
            }
            catch (Exception ex)
            {
                MeetingLogger.Logger.LogError(ex, ex.Message);
            }

            return(false);
        }