private void onMinDomSetClick(object sender, EventArgs e) { if (CurrentGraphPanel == null) { return; } Graph g = CurrentGraphPanel.Graph; NumberInputForm inputForm = new NumberInputForm(); inputForm.ShowDialog(); if (inputForm.DialogResult == DialogResult.OK) { GraphAlgorithms.MinimumDominatingSet(g, inputForm.NumValue); } }