コード例 #1
0
ファイル: FormMain.cs プロジェクト: bobbyzhu/CSharpGL
        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);
                    //}
                }
            }
        }
コード例 #2
0
ファイル: FormMain.cs プロジェクト: chantsunman/CSharpGL
 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);
             //}
         }
     }
 }