protected override void OnShown(EventArgs e) { base.OnShown(e); using (FormLoading form = new FormLoading(_ide)) { if (form.ShowDialog(this) == DialogResult.OK) { // Initialize the IDE interfaces projectMaster.Initialize(_ide); scriptEditor.Initialize(_ide); SelectIDETab(IDETab.ProjectMaster); // Drop the panel panel_CoverLoading.Dispose(); } } }
private void RefreshLevelList() { string cachedNodeText = string.Empty; if (treeView.SelectedNodes.Count > 0) { cachedNodeText = treeView.SelectedNodes[0].Text; // Reinitialize the selected level (That's for treeView_Resources in SectionLevelProperties) _ide.SelectedLevel = null; _ide.SelectedLevel = (ProjectLevel)treeView.SelectedNodes[0].Tag; } // Scan the project's /Levels/ folder using FormLoading using (FormLoading form = new FormLoading(_ide)) { if (form.ShowDialog(this) == DialogResult.OK) { // Refresh the level list FillLevelList(); // If a node was selected, reselect it after refreshing if (!string.IsNullOrEmpty(cachedNodeText)) { foreach (DarkTreeNode node in treeView.Nodes) { if (node.Text.ToLower() == cachedNodeText.ToLower()) { treeView.SelectNode(node); treeView.ScrollTo(node.FullArea.Location); break; } } } CheckItemSelection(); } } }