private void GeneralizeBtn_Click(object sender, System.EventArgs e) { double minDistance = 0; if (double.TryParse(MinDistanceTextBox.Text, out minDistance) && Math.Abs(minDistance) > double.Epsilon) { _viewModel.DrawMap(minDistance); } }