public List<TreeViewItemSkinElement> GetTreeViewItemsSource() { //AppProgressBarController.SetValue(0, 0, "Building structures..."); //AppProgressBarController.ShowIndeterminate(); var items = new List<TreeViewItemSkinElement>(); var nodeSkinApp = new TreeViewItemSkinElement { SkinElement = SkinApp, IsExpanded = true }; var nodeSkinAppStyles = new TreeViewItemSkinElement { SkinElement = new SkinFolderAppStyles() }; foreach (var item in SkinApp.Styles) { nodeSkinAppStyles.Items.Add(new TreeViewItemSkinElement { SkinElement = item }); } nodeSkinApp.Items.Add(nodeSkinAppStyles); var nodeSkinAppOptions = new TreeViewItemSkinElement { SkinElement = new SkinFolderAppOptions() }; foreach (var item in SkinApp.Options) { nodeSkinAppOptions.Items.Add(new TreeViewItemSkinElement { SkinElement = item }); } nodeSkinApp.Items.Add(nodeSkinAppOptions); var nodeSkinAppWindows = new TreeViewItemSkinElement { SkinElement = new SkinFolderAppWindows() }; foreach (var window in SkinApp.Windows) { var nodeSkinArts = new TreeViewItemSkinElement(); var nodeSkinArtImages = new TreeViewItemSkinElement {SkinElement = window.Art}; foreach (var image in window.Art.Images) { nodeSkinArtImages.Items.Add(new TreeViewItemSkinElement { SkinElement = image }); } nodeSkinArts.Items.Add(nodeSkinArtImages); nodeSkinAppWindows.Items.Add( new TreeViewItemSkinElement { SkinElement = window, Items = nodeSkinArts.Items } ); var nodeSkinCommands = new TreeViewItemSkinElement { SkinElement = new SkinFolderCommands() }; foreach (var command in window.Commands) { nodeSkinCommands.Items.Add(new TreeViewItemSkinElement { SkinElement = command }); } nodeSkinArts.Items.Add(nodeSkinCommands); var nodeSkinBrowsers = new TreeViewItemSkinElement { SkinElement = new SkinFolderBrowsers() }; foreach (var browser in window.Browsers) { nodeSkinBrowsers.Items.Add(new TreeViewItemSkinElement { SkinElement = browser }); } nodeSkinArts.Items.Add(nodeSkinBrowsers); var nodeSkinEvents = new TreeViewItemSkinElement { SkinElement = new SkinFolderEvents() }; foreach (var _event in window.Events) { nodeSkinEvents.Items.Add(new TreeViewItemSkinElement { SkinElement = _event }); } nodeSkinArts.Items.Add(nodeSkinEvents); var nodeSkinButtons = new TreeViewItemSkinElement { SkinElement = new SkinFolderButtons() }; foreach (var button in window.Buttons) { var nodeButton = new TreeViewItemSkinElement { SkinElement = button }; var nodeSkinButtonCommands = new TreeViewItemSkinElement { SkinElement = new SkinFolderCommands() }; foreach (var command in button.Commands) { nodeSkinButtonCommands.Items.Add(new TreeViewItemSkinElement { SkinElement = command }); } nodeButton.Items.Add(nodeSkinButtonCommands); var nodeSkinButtonArts = new TreeViewItemSkinElement { SkinElement = button.Art }; foreach (var image in button.Art.Images) { nodeSkinButtonArts.Items.Add(new TreeViewItemSkinElement { SkinElement = image }); } nodeButton.Items.Add(nodeSkinButtonArts); nodeSkinButtons.Items.Add(nodeButton); } nodeSkinArts.Items.Add(nodeSkinButtons); var nodeSkinProgressBars = new TreeViewItemSkinElement { SkinElement = new SkinFolderProgressBars() }; foreach (var progressBar in window.ProgressBars) { var nodeProgressBar = new TreeViewItemSkinElement { SkinElement = progressBar }; var nodeSkinProgressBarArts = new TreeViewItemSkinElement { SkinElement = progressBar.Art }; foreach (var image in progressBar.Art.Images) { nodeSkinProgressBarArts.Items.Add(new TreeViewItemSkinElement { SkinElement = image }); } nodeProgressBar.Items.Add(nodeSkinProgressBarArts); nodeSkinProgressBars.Items.Add(nodeProgressBar); } nodeSkinArts.Items.Add(nodeSkinProgressBars); var nodeSkinComboBox = new TreeViewItemSkinElement { SkinElement = new SkinFolderComboBoxes() }; foreach (var comboBox in window.ComboBoxes) { var nodeComboBox = new TreeViewItemSkinElement { SkinElement = comboBox }; var nodeSkinComboBoxArts = new TreeViewItemSkinElement { SkinElement = comboBox.Art }; foreach (var image in comboBox.Art.Images) { nodeSkinComboBoxArts.Items.Add(new TreeViewItemSkinElement { SkinElement = image }); } nodeComboBox.Items.Add(nodeSkinComboBoxArts); nodeSkinComboBox.Items.Add(nodeComboBox); } nodeSkinArts.Items.Add(nodeSkinComboBox); var nodeSkinListBox = new TreeViewItemSkinElement { SkinElement = new SkinFolderListBoxes() }; foreach (var listBox in window.ListBoxes) { var nodeListBox = new TreeViewItemSkinElement { SkinElement = listBox }; var nodeSkinListBoxArts = new TreeViewItemSkinElement { SkinElement = listBox.Art }; foreach (var image in listBox.Art.Images) { nodeSkinListBoxArts.Items.Add(new TreeViewItemSkinElement { SkinElement = image }); } nodeListBox.Items.Add(nodeSkinListBoxArts); nodeSkinListBox.Items.Add(nodeListBox); } nodeSkinArts.Items.Add(nodeSkinListBox); var nodeSkinScrollBar = new TreeViewItemSkinElement { SkinElement = new SkinFolderScrollBars() }; foreach (var scrollBar in window.ScrollBars) { var nodeScrollBar = new TreeViewItemSkinElement { SkinElement = scrollBar }; var nodeSkinScrollBarArts = new TreeViewItemSkinElement { SkinElement = scrollBar.Art }; foreach (var image in scrollBar.Art.Images) { nodeSkinScrollBarArts.Items.Add(new TreeViewItemSkinElement { SkinElement = image }); } nodeScrollBar.Items.Add(nodeSkinScrollBarArts); nodeSkinScrollBar.Items.Add(nodeScrollBar); } nodeSkinArts.Items.Add(nodeSkinScrollBar); var nodeSkinScrollArrow = new TreeViewItemSkinElement { SkinElement = new SkinFolderScrollArrows() }; foreach (var scrollArrow in window.ScrollArrows) { var nodeScrollArrow = new TreeViewItemSkinElement { SkinElement = scrollArrow }; var nodeSkinScrollArrowArts = new TreeViewItemSkinElement { SkinElement = scrollArrow.Art }; foreach (var image in scrollArrow.Art.Images) { nodeSkinScrollArrowArts.Items.Add(new TreeViewItemSkinElement { SkinElement = image }); } nodeScrollArrow.Items.Add(nodeSkinScrollArrowArts); nodeSkinScrollArrow.Items.Add(nodeScrollArrow); } nodeSkinArts.Items.Add(nodeSkinScrollArrow); var nodeSkinSlider = new TreeViewItemSkinElement { SkinElement = new SkinFolderSliders() }; foreach (var slider in window.Sliders) { var nodeSlider = new TreeViewItemSkinElement { SkinElement = slider }; var nodeSkinSliderArts = new TreeViewItemSkinElement { SkinElement = slider.Art }; foreach (var image in slider.Art.Images) { nodeSkinSliderArts.Items.Add(new TreeViewItemSkinElement { SkinElement = image }); } nodeSlider.Items.Add(nodeSkinSliderArts); nodeSkinSlider.Items.Add(nodeSlider); } nodeSkinArts.Items.Add(nodeSkinSlider); } nodeSkinApp.Items.Add(nodeSkinAppWindows); items.Add(nodeSkinApp); //AppProgressBarController.Hide(); return items; }
public void DrawElement(TreeViewItemSkinElement element) { DrawElement(element.SkinElement); }