private void btnLoadContentCenter_Click(object sender, RoutedEventArgs e) { try { _oConnection = new ContentCenterConnection(); Thread.Sleep(4000); _oConnection.ReadContentCenter(_oConnection.InventorApp.ContentCenter.TreeViewTopNode, _oConnection.Root); //TreeItemViewModel MainNode = new TreeItemViewModel(); //MainNode.Children = oConnection.Menuitems; //MainNode.Title = "Obsahove centrum"; //trvMenu.Items.Add(MainNode); Root = _oConnection.Root; DataContext = Root; btnGenerateFiles.IsEnabled = true; txtDirectory.Text = _oConnection.InventorApp.DesignProjectManager.ActiveDesignProject.ContentCenterPath; } catch (Exception ex) { MessageBox.Show(ex.Message); } }