private void MainForm_Load(object sender, EventArgs e) { //FillCameraComboBox(); AlignInterface(); this.OpenPointsDlg.DefaultExt = ScanDataIO.GetDialogFilter(); this.OpenPointsDlg.InitialDirectory = Program.UserDataPath; }
string ShowDialog() { DialogResult result = DialogResult.Ignore; OpenFileDialog dlg = new OpenFileDialog(); dlg.Filter = ScanDataIO.GetDialogFilter(); dlg.InitialDirectory = Program.UserDataPath; dlg.CheckFileExists = true; if (CallerControl != null) { CallerControl.Invoke(new Action(() => result = dlg.ShowDialog())); } else { result = dlg.ShowDialog(); } if (result == DialogResult.OK) { return(dlg.FileName); } return(string.Empty); }