Exemplo n.º 1
0
        private void UpdateVertexShaderField_Click(object sender, EventArgs e)
        {
            int index = this.lstVertexShaderField.SelectedIndex;

            if (index >= 0)
            {
                var form = new FormUpdateVertexShaderField(
                    this.currentFile, this.lstVertexShaderField.SelectedItem as ShaderField);
                if (form.ShowDialog() == System.Windows.Forms.DialogResult.OK)
                {
                    this.lstVertexShaderField.Items[index]        = form.Result;
                    this.currentFile.VertexShaderFieldList[index] = form.Result;
                    //this.lstVertexShaderField.Items.Clear();
                    //foreach (var item in this.currentFile.VertexShaderFieldList)
                    //{
                    //    this.lstVertexShaderField.Items.Add(item);
                    //}
                }
            }
        }
Exemplo n.º 2
0
 private void UpdateVertexShaderField_Click(object sender, EventArgs e)
 {
     int index = this.lstVertexShaderField.SelectedIndex;
     if (index >= 0)
     {
         var form = new FormUpdateVertexShaderField(
              this.currentFile, this.lstVertexShaderField.SelectedItem as ShaderField);
         if (form.ShowDialog() == System.Windows.Forms.DialogResult.OK)
         {
             this.lstVertexShaderField.Items[index] = form.Result;
             this.currentFile.VertexShaderFieldList[index] = form.Result;
             //this.lstVertexShaderField.Items.Clear();
             //foreach (var item in this.currentFile.VertexShaderFieldList)
             //{
             //    this.lstVertexShaderField.Items.Add(item);
             //}
         }
     }
 }