Example #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;
            }
        }
Example #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();
        }