Exemple #1
0
        public void ApplyNewLayout(string newLayoutRelativePath)
        {
            DisposeView();

            layoutResourceDictionaries = null;
            LayoutFilePath             = getUrl(newLayoutRelativePath);
            View.Instance.SaveExtensionsConfigData();
            if (ToolPanels != null)
            {
                // save the XML for the toolPanels
                toolsXmlFileContents = ToolPanels.GetToolPanelsXml();
            }
            ToolPanels.Current.Clear();
            behaviorsXmlFileContents = GetBehaviorsXml().ToString(SaveOptions.OmitDuplicateNamespaces);
            controlsXmlFileContents  = View.GetConfigurationOfControls();

            disposeExtensibilityObjects();
            if (ViewerApplication != null)
            {
                ViewerApplication.LayoutFilePath = newLayoutRelativePath;
            }
            downloadLayoutFile();

            // Reset the Identify Popup control and content
            PopupHelper.Reset();
        }
Exemple #2
0
 public ViewerApplicationControl()
 {
     VerticalContentAlignment   = System.Windows.VerticalAlignment.Stretch;
     HorizontalContentAlignment = System.Windows.HorizontalAlignment.Stretch;
     ToolPanels             = new ToolPanels();
     BehaviorsConfiguration = new Controls.BehaviorsConfiguration();
     SetInstance(this);
 }
 public ViewerApplicationControl()
 {
     VerticalContentAlignment = System.Windows.VerticalAlignment.Stretch;
     HorizontalContentAlignment = System.Windows.HorizontalAlignment.Stretch;
     ToolPanels = new ToolPanels();
     BehaviorsConfiguration = new Controls.BehaviorsConfiguration();
     SetInstance(this);
 }
Exemple #4
0
        private void disposeExtensibilityObjects()
        {
            if (ToolPanels != null)
            {
                // Dipose attached event handlers
                ToolPanels.Dispose();
            }

            if (BehaviorsConfiguration != null)
            {
                BehaviorsConfiguration.Dispose();
            }
        }
Exemple #5
0
        public IEnumerable <string> GetAllAssembliesNamesInUse(out string behaviorsXml)
        {
            List <string>        assemblies = getUniqueAssemblyNamesForTypes(ToolPanels.GetToolItemObjects());
            IEnumerable <string> namespaces = getAllNamespacesInUse(out behaviorsXml);

            if (namespaces != null)
            {
                foreach (string namespaceMapping in namespaces)
                {
                    string assembly = AssemblyManager.GetAssemblyNameForNamespaceDeclaration(namespaceMapping);
                    if (!string.IsNullOrWhiteSpace(assembly))
                    {
                        if (!assemblies.Contains(assembly) && !AssemblyManager.IsBuiltInAssembly(assembly))
                        {
                            assemblies.Add(assembly);
                        }
                    }
                }
            }
            return(assemblies);
        }