public void AskOpenFile(string defaultfile) { SelOpenDialog sod = new SelOpenDialog(); //if (null != defaultfile) { sod.TextBoxFile.Text = defaultfile; } if (DialogResult.OK == sod.ShowDialog()) { if (sod.RadioLineMode.Checked) { SetMode(Mode.LINE); } else if (sod.RadioZblockMode.Checked) { SetMode(Mode.INT32); } else { SetMode(Mode.GENERIC); } OpenFile(sod.TextBoxFile.Text); } sod.Dispose(); ButtonDown.Select(); }