Exemplo n.º 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);
                }
            }
        }
Exemplo n.º 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);
                }
            }
        }
Exemplo n.º 4
0
 protected void InvokeHidePanel(UIPanelType type, bool forceDeactivate = false)
 {
     HidePanelEvent?.Invoke(type, forceDeactivate);
 }
Exemplo n.º 5
0
 public void InvokeHidePanel()
 {
     HidePanelEvent?.Invoke(PanelType, false);
 }
Exemplo n.º 6
0
 public void InvokeHidePanel(bool forceDeactivate)
 {
     HidePanelEvent?.Invoke(PanelType, forceDeactivate);
 }