Axiom.Demos.ConfigDialog.lstOptions_SelectedIndexChanged C# (CSharp) Method

lstOptions_SelectedIndexChanged() private method

private lstOptions_SelectedIndexChanged ( object sender, EventArgs e ) : void
sender object
e System.EventArgs
return void
		private void lstOptions_SelectedIndexChanged( object sender, EventArgs e )
		{

			this.cboOptionValues.SelectedIndexChanged -= new System.EventHandler( this.cboOptionValues_SelectedIndexChanged );

			RenderSystem system = (RenderSystem)cboRenderSystems.SelectedItem;
			ConfigOption opt = (ConfigOption)lstOptions.SelectedItem;

			cboOptionValues.Items.Clear();
			foreach ( string value in opt.PossibleValues.Values )
				cboOptionValues.Items.Add( value );

			if ( cboOptionValues.Items.Count == 0 )
			{
				cboOptionValues.Items.Add( opt.Value );
			}
			cboOptionValues.SelectedIndex = cboOptionValues.Items.IndexOf( opt.Value );

			this.lblOption.Text = opt.Name;
			this.lblOption.Visible = true;
			this.cboOptionValues.Visible = true;
			this.cboOptionValues.Enabled = ( !opt.Immutable );

			this.cboOptionValues.SelectedIndexChanged += new System.EventHandler( this.cboOptionValues_SelectedIndexChanged );
		}