private void pickDecalImageButton_Click(object sender, EventArgs e) { TexturePickerDialog dlg = new TexturePickerDialog(filenameTextBox.Text, "TerrainDecal"); if (dlg.ShowDialog() == DialogResult.OK) { filenameTextBox.Text = dlg.TextureComboBoxString; } }
public override object EditValue(ITypeDescriptorContext context, IServiceProvider provider, object value) { string texture = ""; if (context != null && context.Instance != null && provider != null) { IWindowsFormsEditorService edSvc = (IWindowsFormsEditorService)provider.GetService(typeof(IWindowsFormsEditorService)); if (edSvc != null) { texture = (string)value; TexturePickerDialog dlg = null; if (texture != null) { if (context.Instance is TerrainDecal) { dlg = new TexturePickerDialog(texture, "TerrainDecal"); } else { if (context.Instance is AutoSplatTerrainDisplay || context.Instance is AlphaSplatTerrainDisplay) { dlg = new TexturePickerDialog(texture, "TerrainTexture"); } } if (dlg != null && dlg.ShowDialog() == DialogResult.OK) { texture = dlg.TextureComboBoxString; } } } } return((object)texture); }
private void pickDecalImageButton_Click(object sender, EventArgs e) { TexturePickerDialog dlg = new TexturePickerDialog(filenameTextBox.Text, "TerrainDecal"); if (dlg.ShowDialog() == DialogResult.OK) { filenameTextBox.Text = dlg.TextureComboBoxString; } }