private void btnEnvBrowse_Click(object sender, EventArgs e) { if (envFileDialog.ShowDialog() == DialogResult.OK) { txtEnvironmentName.Text = Tools.FormatPath(envFileDialog.FileName); } }
private void butModelBrowse_Click(object sender, EventArgs e) { if (saveFileDialog.ShowDialog(this) == DialogResult.OK) { txtModelName.Text = Tools.FormatPath(saveFileDialog.FileName); } }
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); } }