private void ShowDimension(Dimension dimension) { switch (dimension.Name) { case ProcessWdiData.COUNTRIES: EnableControl(showCountriesButton, false); _isCountriesShown = true; TreeForm.Show(dimension); _isCountriesShown = false; EnableControl(showCountriesButton, true); break; case ProcessWdiData.INDICATORS: EnableControl(showIndicatorsButton, false); _isIndicatorsShown = true; TreeForm.Show(dimension); _isIndicatorsShown = false; EnableControl(showIndicatorsButton, true); break; case ProcessWdiData.YEARS: EnableControl(showYearsButton, false); _isYearsShown = true; TreeForm.Show(dimension); _isYearsShown = false; EnableControl(showYearsButton, true); break; } }
public static void Show(Dimension dimension, bool modalWindow = true) { TreeForm instance = new TreeForm(); instance.Text = dimension.Name; CreateTreeNode(instance.treeView.Nodes, dimension); foreach (var element in dimension.Elements) { } if (modalWindow) { instance.ShowDialog(); } else { instance.Show(); } }