示例#1
0
        /// <summary>
        /// Close a panel when it is being hidden.
        /// </summary>
        /// <param name="hidePanelEvent">
        /// The <see cref="HidePanelEvent"/>
        /// </param>
        private void CloseHiddenPanel(HidePanelEvent hidePanelEvent)
        {
            var allBrowsers = this.GetAllOpenBrowsers().SelectMany(x => x);
            var browser     = allBrowsers.SingleOrDefault(x => x.Identifier == hidePanelEvent.Identifier);

            if (browser != null)
            {
                this.PanelNavigationService.CloseInAddIn(browser);

                if (this.openElementDefinitionBrowsers.Contains(browser))
                {
                    this.openElementDefinitionBrowsers.Remove(browser as ElementDefinitionsBrowserViewModel);
                }
                else if (this.openOptionBrowsers.Contains(browser))
                {
                    this.openOptionBrowsers.Remove(browser as OptionBrowserViewModel);
                }
                else if (this.openFiniteStateBrowsers.Contains(browser))
                {
                    this.openFiniteStateBrowsers.Remove(browser as FiniteStateBrowserViewModel);
                }
                else if (this.openPublicationBrowsers.Contains(browser))
                {
                    this.openPublicationBrowsers.Remove(browser as PublicationBrowserViewModel);
                }
            }
        }
示例#2
0
        /// <summary>
        /// Handles a <see cref="CustomTaskPane"/>'s VisibleStateChangeEvent
        /// </summary>
        /// <param name="customTaskPaneInst">
        /// The <see cref="_CustomTaskPane"/>
        /// </param>
        private void CustomTaskPane_VisibleStateChangeEvent(_CustomTaskPane customTaskPaneInst)
        {
            if (customTaskPaneInst.Visible)
            {
                return;
            }

            var identifier     = this.customTaskPanes.SingleOrDefault(x => x.Value.CustomTaskPane == customTaskPaneInst).Key;
            var hidePanelEvent = new HidePanelEvent(identifier);

            CDPMessageBus.Current.SendMessage(hidePanelEvent);
        }
        /// <summary>
        /// Close a panel when it is being hidden.
        /// </summary>
        /// <param name="hidePanelEvent">
        /// The <see cref="HidePanelEvent"/>
        /// </param>
        private void CloseHiddenPanel(HidePanelEvent hidePanelEvent)
        {
            var allBrowsers = this.GetAllOpenBrowsers().SelectMany(x => x);
            var browser     = allBrowsers.SingleOrDefault(x => x.Identifier == hidePanelEvent.Identifier);

            if (browser != null)
            {
                this.PanelNavigationService.CloseInAddIn(browser);

                if (this.openProductTree.Contains(browser))
                {
                    this.openProductTree.Remove(browser as ProductTreeViewModel);
                }
            }
        }
示例#4
0
 protected void InvokeHidePanel(UIPanelType type, bool forceDeactivate = false)
 {
     HidePanelEvent?.Invoke(type, forceDeactivate);
 }
示例#5
0
 public void InvokeHidePanel()
 {
     HidePanelEvent?.Invoke(PanelType, false);
 }
示例#6
0
 public void InvokeHidePanel(bool forceDeactivate)
 {
     HidePanelEvent?.Invoke(PanelType, forceDeactivate);
 }