private void UpdateFragmentShaderField_Click(object sender, EventArgs e) { int index = this.lstFragmentShaderField.SelectedIndex; if (index >= 0) { var form = new FormUpdateShaderField( this.currentFile, this.lstFragmentShaderField.Items[index] as ShaderField); if (form.ShowDialog() == System.Windows.Forms.DialogResult.OK) { this.lstFragmentShaderField.Items[index] = form.Result; this.currentFile.FragmentShaderFieldList[index] = form.Result; //this.lstFragmentShaderField.Items.Clear(); //foreach (var item in this.currentFile.FragmentShaderFieldList) //{ //this.lstFragmentShaderField.Items.Add(item); //} } } }
private void UpdateGeometryShaderField_Click(object sender, EventArgs e) { int index = this.lstGeometryShaderField.SelectedIndex; if (index >= 0) { var form = new FormUpdateShaderField( this.currentFile, this.lstGeometryShaderField.Items[index] as ShaderField); if (form.ShowDialog() == System.Windows.Forms.DialogResult.OK) { this.lstGeometryShaderField.Items[index] = form.Result; this.currentFile.GeometryShaderFieldList[index] = form.Result; //this.lstGeometryShaderField.Items.Clear(); //foreach (var item in this.currentFile.GeometryShaderFieldList) //{ //this.lstGeometryShaderField.Items.Add(item); //} } } }