private void OptionsComboBox_SelectedIndexChanged(object sender, EventArgs e)
{
if (mOptionsComboBox.SelectedItem != null && mOptionsComboBox.SelectedItem is AssetTypeInfo)
{
AssetTypeInfo ati = mOptionsComboBox.SelectedItem as AssetTypeInfo;
string fileType = GetObjectTypeFromAti(ati);
foreach (var option in mFileTypeOptions)
{
if (option.ObjectType.Contains(fileType))
{
mDynamicUiHelper.Show(option.UiId);
}
else
{
mDynamicUiHelper.Hide(option.UiId);
}
}
if (mIsNameDefault)
{
// We want to make sure we don't
// suggest a name that is already
// being used.
//textBox1.Text = fileType + "File";
textBox1.Text = StringFunctions.MakeStringUnique(fileType + "File", mNamesAlreadyUsed, 2);
while (ObjectFinder.Self.GetReferencedFileSaveFromFile(textBox1.Text + "." + ResultAssetTypeInfo.Extension) != null)
{
textBox1.Text = FlatRedBall.Utilities.StringFunctions.IncrementNumberAtEnd(textBox1.Text);
}
}
}
}