示例#1
0
        public CascadeManager(Workspace workspace)
        {
            //TODO get from config
            CascadeOffsetX   = 30;
            CascadeOffsetY   = 20;
            DistanceFromMenu = 70;

            _workspace  = workspace;
            _rootConfig = ServiceLocator.Instance.Resolve <RootConfigurationViewModel>();
        }
        public MainPageViewModel()
        {
            var foundationConfig = new FoundationConfiguration
            {
                ContentItemViewModelFactory = new CustomContentItemViewModelFactoryFactory()
            };

            ServiceLocator.Instance.Register(foundationConfig);

            var config = ServiceLocator.Instance.Resolve <RootConfiguration>();

            _rootConfig          = new RootConfigurationViewModel(config);
            _workspaceBackground = _rootConfig.SelectedSession.Root.WorkspaceSettings;

            ServiceLocator.Instance.Register(RootConfiguration);
        }
示例#3
0
        public WindowManagerBase(Workspace workspace)
        {
            _workspace    = workspace;
            _rootConfigVm = ServiceLocator.Instance.Resolve <RootConfigurationViewModel>();

            _vmWindowMapping = new Dictionary <ContentItemViewModel, Window>();

            _selectedMenuItemBus       = EventBusManager.Instance.GetOrCreateBus(nameof(ContentItemViewModel.MenuSelectedItemBus));
            _windowOperationsBus       = EventBusManager.Instance.GetOrCreateBus("WindowOperationBus");
            _remoteWindowOperationsBus = EventBusManager.Instance.GetOrCreateBus("RemoteWindowOperationBus");
            _remoteBus = EventBusManager.Instance.GetRemoteEventBus();


            _windowOperationsBus.EventBroadcasted       += WindowOperationsBus_EventBroadcasted;
            _selectedMenuItemBus.EventBroadcasted       += SelectedMenuItemBus_EventBroadcasted;
            _remoteWindowOperationsBus.EventBroadcasted += RemoteWindowOperationsBus_EventBroadcasted;

            _cascadeManager = new CascadeManager(_workspace)
            {
                HostType = _rootConfigVm.HostType
            };
        }