private void buttonLoadClassifier_Click(object sender, EventArgs e) { DialogResult result = openFileDialog.ShowDialog(); if (result == DialogResult.OK) { classifierFile = openFileDialog.FileName; labelClassifier.Text = openFileDialog.SafeFileName; objectDetector = new ObjectDetector(classifierFile); } }