/// <summary> /// Initializes a new instance of the <see cref="TableElementData"/> class from the data in a TableElement. /// </summary> /// <param name="TableElement">The table element containg the data.</param> public TableElementData(TableElement TableElement) { this.Number = TableElement.Number; this.TableElementType = TableElement.TableElementType; this.Value = TableElement.Value; }
/// <summary> /// Initializes a new instance of the <see cref="TableElementValueChangedEventArgs"/> class. /// </summary> /// <param name="TableElement">The table element which has triggered the event.</param> public TableElementValueChangedEventArgs(TableElement TableElement) { this.TableElement = TableElement; }
private void UpdateTableElementAssignedEffects(TableElement TableElement) { DataTable DT = new DataTable(); DT.Columns.Add("Name", typeof(string)); DT.Columns.Add("Type", typeof(string)); DT.Columns.Add("Configured in", typeof(string)); if (TableElement != null) { foreach (AssignedEffect AE in TableElement.AssignedEffects) { Type T = null; string Configured="<not configured>"; if(Pinball.Table.Effects.Contains(AE.EffectName)) { T= Pinball.Table.Effects[AE.EffectName].GetType(); Configured = "Table"; } DT.Rows.Add(AE.EffectName,T.Name,Configured); } } TableElementAssignedEffects.ClearSelection(); TableElementAssignedEffects.Columns.Clear(); TableElementAssignedEffects.AutoGenerateColumns = true; TableElementAssignedEffects.DataSource = DT; TableElementAssignedEffects.AutoResizeColumns(DataGridViewAutoSizeColumnsMode.AllCells); TableElementAssignedEffects.Refresh(); }