private void btnTextureBrowse_Click(object sender, EventArgs e) { if (string.IsNullOrWhiteSpace(txtModelName.Text)) { MessageBox.Show("Select model file path first"); return; } if (folderBrowserDialog1.ShowDialog() == DialogResult.OK) { string selectedFolderPath = folderBrowserDialog1.SelectedPath; string absoluteModelPath = Tools.UnformatPath(txtModelName.Text); if (!Tools.IsBelowModelPath(selectedFolderPath, absoluteModelPath)) { MessageBox.Show("WARNING: folderPath should be below model file path"); } txtTextureName.Text = Tools.FormatPath(folderBrowserDialog1.SelectedPath); } }