private void AddNewConnectionClick(object sender, EventArgs e) { if (addNewConnection == null) { this.Controls.Add(addNewConnection = new EditConnectionDefinition(ClientSize, Background, AC, _stationsList, SearchResult.Mode.NewConnection)); addNewConnection.Visible = false; } if (addStation != null) { addStation.sync(); } Background.Visible = false; addNewConnection.Visible = true; }
private void EditConnectionDefinitionButtonClick(object sender, EventArgs e) { if (editConnectionDefinition == null) { this.Controls.Add(editConnectionDefinition = new EditConnectionDefinition(ClientSize, Background, AC, _stationsList)); editConnectionDefinition.Visible = false; } if (addStation != null) { addStation.sync(); } Background.Visible = false; editConnectionDefinition.Visible = true; }