private void createNetworkBtn_Click(object sender, RoutedEventArgs e) { if (!FormValidation.isConfigurationValid(configurationBox, out string configurationError)) { networkStatus.Content = configurationError; return; } configuration = new Configuration(configurationBox.Text); network = new Network(configuration); reset(); networkStatus.Content = "Sieć utworzona"; }