Exemplo n.º 1
0
        private void DomLoadedEventHandler(FileOperationType loadType)
        {
            switch (loadType)
            {
            case FileOperationType.Create:
            case FileOperationType.Open:
                LoadPaneTitle();
                if (_document != null)
                {
                    if (_document.DocumentType == DocumentType.Library)
                    {
                        PanePageIcon.Show();
                        PanePageProp.Hide();
                    }
                    else
                    {
                        PanePageIcon.Hide();
                        PanePageProp.Show();
                    }
                    FirePropertyChanged("LibraryVisibility");
                    FirePropertyChanged("DocumentVisibility");
                    UpdateWindowStyle();
                }
                break;

            case FileOperationType.Close:

                break;
            }
        }
Exemplo n.º 2
0
        //private IEventAggregator eventAggregation;
        public DockingLayoutViewModel(DockingManager dockManager)
        {
            if (IsInDesignMode)
            {
                return;
            }
            dockingManager = dockManager;


            //Subscribe the Page and Layout Event message
            _ListEventAggregator.GetEvent <OpenNormalPageEvent>().Subscribe(OpenNormalPageEventHandler, ThreadOption.UIThread);
            _ListEventAggregator.GetEvent <OpenMasterPageEvent>().Subscribe(OpenMasterPageEventHandler, ThreadOption.UIThread);
            _ListEventAggregator.GetEvent <OpenWidgetPageEvent>().Subscribe(OpenWidgetPageEventHandler, ThreadOption.UIThread);
            _ListEventAggregator.GetEvent <ClosePageEvent>().Subscribe(ClosePageEventHandler, ThreadOption.UIThread);
            _ListEventAggregator.GetEvent <ChangeLayoutEvent>().Subscribe(ChangeLayoutEventHandler, ThreadOption.UIThread);
            _ListEventAggregator.GetEvent <RenamePageEvent>().Subscribe(RenamePageEventHandler, ThreadOption.UIThread);
            _ListEventAggregator.GetEvent <OpenPanesEvent>().Subscribe(OpenPanesEventHandler, ThreadOption.UIThread);
            _ListEventAggregator.GetEvent <UpdateLanguageEvent>().Subscribe(ChangeLangageHandler);
            _ListEventAggregator.GetEvent <AddNewPageEvent>().Subscribe(AddPageRequestExecute, ThreadOption.UIThread);
            _ListEventAggregator.GetEvent <DomLoadedEvent>().Subscribe(DomLoadedEventHandler, ThreadOption.UIThread);

            _ListEventAggregator.GetEvent <WdgMgrChangeSelectionEvent>().Subscribe(WdgMgrChangeSelectionHandler, ThreadOption.UIThread);
            _ListEventAggregator.GetEvent <WdgMgrDeleteSelectionEvent>().Subscribe(WdgMgrDeleteSelectioHandler);
            _ListEventAggregator.GetEvent <WdgMgrEditSelectionEvent>().Subscribe(WdgMgrEditSelectioHandler);
            _ListEventAggregator.GetEvent <WdgMgrHideSelectionEvent>().Subscribe(WdgMgrHideSelectioHandler);
            _ListEventAggregator.GetEvent <WdgMgrZorderChangedEvent>().Subscribe(WdgMgrZChangeSelectioHandler);
            _ListEventAggregator.GetEvent <WdgMgrOrderwidgetEvent>().Subscribe(WdgMgrReZOrderSelectionHandler, ThreadOption.UIThread);
            _ListEventAggregator.GetEvent <WdgMgrPlacewidgetEvent>().Subscribe(WdgMgrPlacewidgetSelectioHandler);
            _ListEventAggregator.GetEvent <WdgMgrOpenChildWidgetPage>().Subscribe(OpenChildWidgetPageEventHandler, ThreadOption.UIThread);
            this.AddNewPageCommand = new DelegateCommand <object>(AddNewPageExecute);

            var activePane = dockingManager.Layout.Descendents().OfType <LayoutAnchorable>().Single(a => a.ContentId == "Sitmap");

            if (GlobalData.IsStandardMode)
            {
                PanePageIcon.Hide();
                PanePageProp.Show();
            }
            else
            {
                PanePageProp.Hide();
                PanePageIcon.Show();
            }


            if (!IsFileExist(Layout_config.Default))
            {
                SaveLayout(Layout_config.Default);

                PanePageIcon.Hide();
            }

            AddPanHidingHandler();

            AddEmptyPage();
        }
Exemplo n.º 3
0
        private void UpdatePaneState()
        {
            if (PaneSitemap != null)
            {
                OpenPaneState(PaneSitemap);
            }
            if (PaneWidgets != null)
            {
                OpenPaneState(PaneWidgets);
            }
            if (PaneMaster != null)
            {
                OpenPaneState(PaneMaster);
            }
            if (PaneInteraction != null)
            {
                OpenPaneState(PaneInteraction);
            }
            if (PaneWidgetProp != null)
            {
                OpenPaneState(PaneWidgetProp);
            }
            if (PanePageProp != null && _document != null && _document.DocumentType == DocumentType.Standard)
            {
                OpenPaneState(PanePageProp);
                PanePageIcon.Hide();
                //AdaptiveModel.GetInstance().IsPagePropOpen = PanePageProp.IsVisible;
                foreach (PageEditorViewModel item in EditPages.OfType <PageEditorViewModel>())
                {
                    if (item == null)
                    {
                        continue;
                    }
                    item.SetAdaptiveViewVisibility(PanePageProp.IsVisible);
                }
            }
            if (PanePageIcon != null && _document != null && _document.DocumentType == DocumentType.Library)
            {
                OpenPaneState(PanePageIcon);
                PanePageProp.Hide();
            }

            if (PaneWidgetManager != null)
            {
                OpenPaneState(PaneWidgetManager);
            }
        }