private void loadModule_Click(object sender, System.Windows.RoutedEventArgs e)
{
var selected = (string)listBoxAvailable.SelectedItem;
if (selected == null)
{
statustextBlock.Text = "Not selected item " + ConfigurationPath + selected;
return;
}
if (!ConfigurationPath.EndsWith("\\"))
ConfigurationPath += "\\";
if (!File.Exists(ConfigurationPath + selected))
{
statustextBlock.Text = "Not found " + ConfigurationPath + selected;
return;
}
SelectedCfg = selected;
var text =File.ReadAllText(ConfigurationPath + selected);
textBox.Text = text;
statustextBlock.Text = "Loaded " + ConfigurationPath + selected;
}