コード例 #1
0
        private void textureBox_Click(object sender, EventArgs e)
        {
            using (TexturePicker texPicker = new TexturePicker(textures, materials[comboMaterial.SelectedIndex].TextureID))
            {
                if (texPicker.ShowDialog(this) == DialogResult.OK)
                {
                    materials[comboMaterial.SelectedIndex].TextureID = texPicker.SelectedValue;
                    textureBox.Image = textures[materials[comboMaterial.SelectedIndex].TextureID].Image;

                    RaiseFormUpdated();
                }
            }
        }
コード例 #2
0
        private void textureBox_Click(object sender, EventArgs e)
        {
            if (textures == null)
            {
                MessageBox.Show("No textures loaded!", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                return;
            }
            using (TexturePicker texPicker = new TexturePicker(textures, materials[comboMaterial.SelectedIndex].TextureID))
            {
                if (texPicker.ShowDialog(this) == DialogResult.OK)
                {
                    materials[comboMaterial.SelectedIndex].TextureID = texPicker.SelectedValue;
                    textureBox.Image = textures[materials[comboMaterial.SelectedIndex].TextureID].Image;

                    RaiseFormUpdated();
                }
            }
        }
コード例 #3
0
        private void textureBox_Click(object sender, EventArgs e)
        {
            using (TexturePicker texPicker = new TexturePicker(textures, materials[comboMaterial.SelectedIndex].TextureID))
            {
                if (texPicker.ShowDialog(this) == DialogResult.OK)
                {
                    materials[comboMaterial.SelectedIndex].TextureID = texPicker.SelectedValue;
                    textureBox.Image = textures[materials[comboMaterial.SelectedIndex].TextureID].Image;

                    RaiseFormUpdated();
                }
            }
        }