Ejemplo n.º 1
0
 /// <summary>
 /// Finds the type starting form <see cref="Root.SolutionRoot"/> and if not succeeded tries <see cref="Root.LibraryRoot"/>.
 /// </summary>
 /// <param name="myType">My type.</param>
 /// <returns></returns>
 internal ITypeDesign FindType(XmlQualifiedName myType)
 {
     foreach (ProjectTreeNode node in this)
     {
         ITypeDesign ret = node.Find(myType);
         if (ret != null)
         {
             return(ret);
         }
     }
     return(LibraryRoot.FindType(myType));
 }
    private void ButtonBrowseLibrary_Click(object sender, RoutedEventArgs e)
    {
        LibraryRoot t = (sender as Button).DataContext as LibraryRoot;

        BrowseFolderWindow browseFolderWindow = new BrowseFolderWindow()
        {
            Owner = this, SelectedPath = t?.Path
        };

        browseFolderWindow.ShowDialog();

        if (browseFolderWindow.DialogResult == true)
        {
            if (t == null)
            {
                MainWindowViewModel ViewModel = DataContext as MainWindowViewModel;
                ViewModel.LibraryRootDirectories.Add(new LibraryRoot(browseFolderWindow.SelectedPath));
            }
            else
            {
                t.Path = browseFolderWindow.SelectedPath;
            }
        }
    }
Ejemplo n.º 3
0
 /// <summary>
 /// Resets the information model and adds recursively all nodes to the address space from <see cref="Root.LibraryRoot"/> and next from <see cref="Root.SolutionRoot"/>.
 /// </summary>
 /// <param name="space">The address space.</param>
 internal void ResetAndAddToAddressSpace(IAddressSpaceCreator space)
 {
     LibraryRoot.AddNode2AddressSpace(space);
     AddNode2AddressSpace(space);
 }